Hi vilihuo_yu,
感谢在MSDN论坛发帖。
>> && _Ostr.rdbuf()->sputn(_Val, _Count) != _Count)
你是在调用哪个函数的时候报的错? 是不是使用wcout 输出CString的时候? 如果是的话, 要使用带有wcout的CString,必须将对象显式地转换为const wchar_t *,例如:
CString cs("hello");
wcout <<(const wchar_t*) cs <<endl;
没有cast,CString被视为一个void *,wcout打印对象的地址。
希望对你有所帮助。
Best Regards,
Sera Yu
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.