I am away. From everything. Just pure programming. For three hours.
Approx 100 different web pages this evening. As always with C++: million ways to do stuff…
For the moment:
- Initialize some TCHAR array:
- TCHAR s;
- Convert TCHAR array to wstring:
- wstring bob(&s); //bob is the wstring variable name;
- Convert wstring to string:
- string bill( bob.begin(), bob.end() ); //
- Convert string to String^ (High class String with Garbage Collector and everything)
- String^ bill2 = gcnew String(bill.c_str());
- Finally use String^ by MessageBox::Show():
If any shorter way (shortcut), your response will be greatly appreciated. For the moment, ashamed about myself, because did not remember what is String^.