Hi guys,
I am new on this forum and I would like you to help me out regarding to the actual errors that I have got. I am using managed c++ as I have switched over from vb.net, however I need your help because I couldn't figure out the solutions for these actual codes on below which it come with the actual errors I have got.
Here it is:
Code:array<String^> ^StrArr1 = x1->Value->ToString()->Split("");
Error: error C2664: 'cli::array<Type> ^System::String::Split(...cli::array<wchar_t,dimen sion> ^)' : cannot convert parameter 1 from 'const char [1]' to 'wchar_t'
Code:
Error: error C2440: '=' : cannot convert from 'System::Object ^' to 'System::String ^'Code:value1 = (key1->GetValue("Test"));
Code:
Error: error C2451: conditional expression of type 'void' is illegalCode:if (QuitMe = Microsoft::VisualBasic::MsgBoxResult::Yes)
Code:
Error: error C3083: 'CheckBox3': the symbol to the left of a '::' must be a typeCode:Form2::CheckBox2::Checked = Microsoft::VisualBasic::Interaction::GetSetting(Application::ProductName, "Settings", "CheckQuit", "");
Code:
Error: error C3379: 'Project1::Form1::MENUITEMINFO' : a nested class cannot have an assembly access specifier as part of its declarationCode:public ref class MENUITEMINFO { public: int cbSize; int fMask; int fType; int fState; int wID; int hSubMenu; int hbmpChecked; int hbmpUnchecked; int dwItemData; String ^dwTypeData; int cch; };
Code:
Code:Form1^ MainForm = gcnew Form1(); if (MainForm->MenuItem1->Checked == true) { delete this; }
Error: error C2065: 'Form1' : undeclared identifier
Error: error C2065: 'MainForm' : undeclared identifier
Error: error C2061: syntax error : identifier 'Form1'
Error: error C2227: left of '->MenuItem1' must point to class/struct/union/generic type
Error: error C2227: left of '->Checked' must point to class/struct/union/generic type
I have include the form1.h file in a class, but I keep getting the same errors. It is the same for this:
Code:
Code:private: System::Void Form2_Click(Object ^eventSender, System::EventArgs ^eventArgs) { Form2^ myform = gcnew Form2(); myform ->ShowDialog(this); }
And it is the same that it goes for this:
Code:
Code:if (Form2::CheckBox1->Checked == true) { cmQuit::ShowDialog(); e->Cancel = true; }
Error: error C2227: left of '->Checked' must point to class/struct/union/generic type
Error: error2352: 'System::Windows::Forms::Form::ShowDialog' : illegal call of non-static member function
And here it's the class library code:
Code:
Error: error C2451: conditional expression of type 'System::Windows::Forms::RightToLeft' is illegalCode:if (System::Windows::Forms::RighttoLeft::Yes)
I have added the reference of system::Windows::Forms and the header in a class, but it doesn't help to solve it.
Please could you help me to fixed the actual codes as I am received with these actual errors? I find it difficult to correct these errors.
Any advance would be much appreciate.
Thanks,
Mark



LinkBack URL
About LinkBacks




