How would I convert a String* variable to a char*variable?
string s; a_function_that_takes_a_cstring(s.c_str());
Here's the answer:
str1 = textBox1->Text;
// convert from managed String to char *
chars = (char*)(Marshal::StringToHGlobalAnsi(str1)).ToPointer();
We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.