wstringstream に問題があります。私がこれをしているとき
std::wstringstream ss;
wchar_t* str = NULL;
ss << str;
アプリケーションがエラーでクラッシュする
Unhandled exception at 0x53e347af (msvcr100d.dll) in stringstr.exe: 0xC0000005: Access violation reading location 0x00000000.
たとえば、これはうまくいきます:
ss << NULL;
wchar_t* str = L"smth";
ss << &str;
常に str に値があるとは限りません。NULL の場合もあり、NULL の場合はストリームに 0 を入れたいと思います。修正方法は?