Newbie: how do I convert basic_string to char*?
First of all, you should be using basic_string directly. Use string or
wstring instead (they are typedefs of basic_string).
Second, to get a const char* to the data of a string, use the c_str()
void func(const char*);
string HW("Hello, World!");
> I have a Win32 Console Application project where I read in a file, find
> replace some strings, and either write to file or transmit the string via
> I've puzzled it all together except the socket bit. By looking at some
> examples I've drawn the conclusion that I must convert this string. So,
> do I convert the basic_string I've used to char*?