moowy
8th May 2007, 01:58
Hi,
I'm having troubles with using swprintf function. I'm trying to concatenate std::string with wide string and an integer like this:
wchar_t buffer[128];
swprintf( buffer, 128, L" Hello %s %d", /* std::string */ name , /* int */ number);
The problem is in std::string, because when I try to write the buffer to the screen it always tells me that the name is [null] -> but it isn't. Can anyone tell me what I'm doing wrong ?
I'm having troubles with using swprintf function. I'm trying to concatenate std::string with wide string and an integer like this:
wchar_t buffer[128];
swprintf( buffer, 128, L" Hello %s %d", /* std::string */ name , /* int */ number);
The problem is in std::string, because when I try to write the buffer to the screen it always tells me that the name is [null] -> but it isn't. Can anyone tell me what I'm doing wrong ?