Strings that you store in a standard string object.. are still strings. They need to be null terminated.. how else would you know where they end?
Perhaps this works..
chemCode:CString str = "Hello World!\0"; std::string str2((char*)str.GetString()); std::cout << str2;




Reply With Quote