On Sat, 12 Jul 2008, James Gregory wrote:
Here is my little test program: #include <iostream> #include <wchar.h> #include <string> using std::wcout; using std::wstring; using std::endl; int main(char** argv, int argc) { wstring s = L"blah"; wchar_t o[50]; swprintf(o, 50, L"%s", s.c_str()); wcout << o << endl; } I would expect it to produce write "blah" on the standard output, but instead it writes "b". Why is this?
I think you want "%ls".
Thanks, James