-
String to Char array?
Hey everyone, for a program I am writing, i need to convert a string of the class std::string to a character array. So essentially i need to convert something of the form:
string toBeConverted;
into:
char converted[];
does anyone know if theres a function to do that or a method of doing that?
-
>for a program I am writing, i need to convert a string of the class std::string to a character array
*sigh* Call the c_str() member function of std::string and you'll get a C-style string. Take a look at my reply to your other thread asking this question.
And don't be in such a rush.