GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 23-May-2007, 21:41
not a banana not a banana is offline
New Member
 
Join Date: May 2007
Posts: 9
not a banana is an unknown quantity at this point

Total Noob needing help


Total noob over here. It says I need the /clr:oldSyntax option for __property. I need the new method for creating a property. get_website is the property is equal to get_website = "http://" + get_website(); << 254 get_website = (textBox1->Text)();
Total noob please help.

Code:
Code:
private: __property System::String * get_website()
error C4980: '__property' : use of this keyword requires /clr:oldSyntax command line option
error C3699: '*' : cannot use this indirection on type 'System::String'

Code:
get_website = "http://" + get_website(); << 254 get_website = (textBox1->Text)(); << 255
(254) : error C2659: '=' : function as left operand
(255) : error C2659: '=' : function as left operand
Code:
Code:
webBrowser1->Navigate(gcnew Uri(get_website)); << 259
(259) : error C3867: 'HyperBrowser::Form1::get_website': function call missing argument list; use '&HyperBrowser::Form1::get_website' to create a pointer to member

I need to borrow a book from the library before my own incompetence gets the best of me.
  #2  
Old 01-Jun-2007, 18:13
not a banana not a banana is offline
New Member
 
Join Date: May 2007
Posts: 9
not a banana is an unknown quantity at this point

Re: Total Noob needing help


Still need help here... Using old syntax makes more errors than I have already.
  #3  
Old 01-Jun-2007, 19:02
TurboPT's Avatar
TurboPT TurboPT is offline
Regular Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 966
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Total Noob needing help


Try this:
CPP / C++ / C Code:
// NO underscores, new syntax.
property String ^ get_website(); 
EDIT:
See the help for: __property
Here's the first note in the help:
Quote:
This topic applies only to version 1 of Managed Extensions for C++. This syntax should only be used to maintain version 1 code. See property for information on using the equivalent functionality in the new syntax.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #4  
Old 03-Jun-2007, 21:04
not a banana not a banana is offline
New Member
 
Join Date: May 2007
Posts: 9
not a banana is an unknown quantity at this point

Re: Total Noob needing help


CPP / C++ / C Code:
	private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
			 }

private: property String ^ get_website[]{
				 return textBox1->Text->Trim();   '234
			 }
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
			 webBrowser1->Navigate("http://www.google.com");
		 }
private: System::Void button3_Click(System::Object^  sender, System::EventArgs^  e) {
			 webBrowser1->GoBack();
		 }
private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
			 webBrowser1->GoForward();
		 }
private: System::Void button4_Click(System::Object^  sender, System::EventArgs^  e) {
		     webBrowser1->Refresh();
		 }
private: System::Void button5_Click(System::Object^  sender, System::EventArgs^  e) {
			 webBrowser1->Stop();
		 }

private: System::Void button6_Click(System::Object^  sender, System::EventArgs^  e) {
			 if (textBox1->Text->StartsWith != ("http://")) 
			 {
			   get_website = "http://" + get_website();
			   get_website =(textBox1->Text);
			 }
			 else 
			 {
			   webBrowser1->Navigate(gcnew Uri(get_website))();
			 }
             }
}
}

c:\documents and settings\cody parman\my documents\visual studio 2005\projects\hyperbrowser+\hyperbrowser+\Form1.h( 234) : error C2059: syntax error : 'return'
c:\documents and settings\cody parman\my documents\visual studio 2005\projects\hyperbrowser+\hyperbrowser+\Form1.h( 234) : error C2238: unexpected token(s) preceding ';'
c:\documents and settings\cody parman\my documents\visual studio 2005\projects\hyperbrowser+\hyperbrowser+\Form1.h( 235) : error C3903: 'HyperBrowser::Form1::get_website': does not have set or get method

I cant find any good C++ books yet, or any in-depth tutorials
Last edited by LuciWiz : 04-Jun-2007 at 12:52. Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
  #5  
Old 04-Jun-2007, 18:12
not a banana not a banana is offline
New Member
 
Join Date: May 2007
Posts: 9
not a banana is an unknown quantity at this point

Re: Total Noob needing help


All I really need to know is how to declare the property get_website as a string and make it equal to textBox1->Text->Trim. I can make all the equations and statements by myself.
 
 

Recent GIDBlogDeveloping GUIs with wxPython (Part 2) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking Problems :D killer9012 C++ Forum 4 05-Nov-2006 14:39
Math problem: Total Noob Targsmom C Programming Language 3 20-Oct-2006 05:05
Code Contest Paramesh Miscellaneous Programming Forum 76 30-Jun-2006 12:18
Coding Contest #1 davis Miscellaneous Programming Forum 0 12-Jun-2006 08:29
Having a problem Chuckles Computer Hardware Forum 19 13-Sep-2004 12:17

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 12:11.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.