Hi all,
I want to read a UNICODE string into a char buffer. So I do the following.
GetAsString() method return a UNICODE string. That's mean there is a zero/null after each character, so in sprintf() it terminate after finding the null. So only first character is added to the buffer. How can I fix it.Code:std::string temp = GetAsString(); std::cout << temp << std::endl; char buff[256] = {0}; int val = sprintf(buff, "%s", temp.c_str());
Thanks




Reply With Quote