Posted by hussein on August 07, 2000 at 17:27:34:
In Reply to: string class to char array conversion posted by ak on August 07, 2000 at 16:34:53:
: how?
: surely there's an easier way that copying character by character via a loop.
string teststring;
char testarray[1024];
strcpy (testarray, teststring.c_str ());
"c_str" is a function that accesses the c-style string version of the string variable.