开发者

Is there a unified cout/wcout to handle char* and wchar*

I am not sur开发者_StackOverflow社区e if there is a unified way to handle char* and wchar* in Visual c++?


A reasonably convenient way to handle both wchar and char strings is via bstr_t, which can be constructed from either and cast to either.

Under the covers, this class uses the required Win32 character conversion APIs to ensure correct output. It's really a COM helper class (BSTR is the COM string type), but no reason why you cannot use it even if you don't need COM.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜