help

ok so im a beginner on c++ and have got two error's can any one help here they are

1>c:\users\billy\documents\visual studio 2010\projects\internet browser jet\internet browser jet\Form1.h(238): error C2065: 'WebBrowser1' : undeclared identifier
1>c:\users\billy\documents\visual studio 2010\projects\internet browser jet\internet browser jet\Form1.h(238): error C2228: left of '.GoBack' must have class/struct/union
1> type is ''unknown-type''

and here is my code

private: System::Void webBrowser1_DocumentCompleted(System::Object^ sender, System::Windows::Forms::WebBrowserDocumentCompletedEventArgs^ e) {
; };
private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) { WebBrowser1.Navigate(Textbox1.Text)
; };
private: System::Void statusStrip1_ItemClicked(System::Object^ sender, System::Windows::Forms::ToolStripItemClickedEventArgs^ e) {
; };
private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) { WebBrowser1.Stop()
; };
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) { WebBrowser1.Refresh()
; };
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) { WebBrowser1.GoForward()
; };
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { WebBrowser1.GoBack()
; };
private: System::Void panel1_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) {
; }
};
};

thanks
That doesn't look like source code. If it is it's definitely not beginner C++ stuff.
Looks like some kind of .NET language rather than C++
closed account (zb0S216C)
I seen this type of code before when I started a new Windows Form in Visual Studio Express 2010. My eyes rolled out of my sockets when I saw it.

So you're a beginner in C++ and you've started a project that involves internet sockets, and the Windows API? Not the best project for a beginner if I'm honest.
I think it is safe to say that your code looks like Visual C# to me. As to why you are receiving errors; if what you have posted above is the entire segment of code. The reason why you are receiving:
error C2065: 'WebBrowser1' : undeclared identifier
error C2228: left of '.GoBack' must have class/struct/union

is because 'WebBrowser1 is undeclared and when you try to access the objects function 'GoBack' it cannot be reached because the object is undeclared.
i fixed it all i had to do was actually copy and past the name of the component into the actual code and sorry my bad it was c#
Topic archived. No new replies allowed.