When I first started working with forms in Microsoft Visual Studio I had some problems getting to grips with their managed class. One of the more fustrating points was that text boxes returned text as type System::String and all my functions were expecting std::strings.

Converting from std:string to System::String was quite simple:

Code:

std::string myString = "Hello World"
 
System::String out = gcnew System::String(myString.c_str());

However, converting System::String to std::string was a little more tricky:

Code:

System::String myString = "Hello World";
 
std::string out = (const char*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(myString )).ToPointer();

Trackback address for this post

An unexpected error has occurred!

If this error persists, please report it to the administrator.

Go back to home page

Additional information about this error:

MySQL error!

Can't open file: 'evo_plugin_captcha_img_17_data.MYI' (errno: 145)(Errno=1016)

Your query:

SELECT COUNT(*) 
FROM evo_plugin_captcha_img_17_data
WHERE cpt_public = "d17d5fa6d9ec45e0ca1a20e7c76701a1"