| Quantum7 (28) | |
|
I just have a couple more errors to get rid of so far: 1>NTS.cpp(132): error C2065: 'cli_msg' : undeclared identifier 1>NTS.cpp(133): error C2660: 'System::IntPtr::ToPointer' : function does not take 1 arguments I have looked all over the place for the right namespace or #include that will support those identifiers. | |
|
|
|
| Imadatobanisa (647) | |
| Please post your entire code here. | |
|
|
|
| andywestken (1964) | |
#1 cli_msg is just the name I chose for my variable. Use whatever name you used for your variable. (In my easrlier post, I assumed my code fragments ran on from each other). String^ my_str = gcnew String(etc); // etc already declared #2 IntPtr::ToPointer doesn't take one argument. It's called againt a variable without an arguent. Andy PS MSDN is the place you need to for .Net info -- http://msdn.microsoft.com -- rather than cplusplus.com's reference -- which is for (native) C++ | |
|
Last edited on
|
|
| Quantum7 (28) | |||
Alright, the program compiles correctly so far with converting the String to the char. Here is what I put together so far, just to make sure that everything is in its right place:
| |||
|
|
|||
| andywestken (1964) | |
| Your first line is going to cause confusion. You're feeding the new variable back into its own constructor... | |
|
|
|
| Quantum7 (28) | |
| What is etc then and what type is it? | |
|
|
|
| andywestken (1964) | |
|
"etc" is whatever char* variable you need to convert to a System::String Looking back at the thread, this should have been obvious from earlier examples (see e.g. my post of Nov 21, 2012 at 3:03am) | |
|
Last edited on
|
|
| Quantum7 (28) | |
|
Alright, that issue is done with. Now, I got the textBox linking issue with: String^ input = this->textBox1->Text = cli_str; The following compiler errors have occurred: 1>NTS.cpp(106): error C2065: 'str' : undeclared identifier 1>NTS.cpp(113): error C2355: 'this' : can only be referenced inside non-static member functions 1>NTS.cpp(113): error C2227: left of '->textBox1' must point to class/struct/union/generic type 1>NTS.cpp(113): error C2227: left of '->Text' must point to class/struct/union/generic type | |
|
|
|
| andywestken (1964) | |
|
Those are compiler errors. To fix them you just need to use the right variable name. And call the functions inside a membe function of the form. All these error are minor, generic C++ errors. See the cplusplus.com tutorials for information about varaibles and classes (inc. static vs other members) | |
|
|
|