请问怎么把CString转换为WString? int fun(CString str){ //调用fun2 fun2(WString wstr);}str参数要传给wstr 请问 怎么才能把CString 的 str 转换为 wstring 的 wstr ?请大家帮帮忙~~ 多谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 CString a;CStringW b = a;wstring c = (LPCWSTR)b; fireseed(奶油狗【奥伊斯特拉赫的声音简直不可思异!】) CString a;CStringW b = a;wstring c = (LPCWSTR)b;要加一点特点说明: 要求你的工程字符集设置为unicode 才行缺省为多字节。 .net 中设置方法: class view -> rclick: select property -> reqularly ....如果是多字节: 用MultiByteToWideChar 转 自绘CEdit透明背景--多字节工程下正常 unicode工程下问题 UDP通信? 奇怪的c++的编译器,我到底是哪错了 位图显示问题~ 【新手】VC6 如何简单地读取和写入文件。如:读写 CString 到一个 txt 文件。 使用 _com_issue_error 函数 应包括什么头文件? 在那能方便的下载MSDN 新手问题 帮忙谢谢 关于类型转换 我遇到麻烦了 高手给看一下吧 求助:类前面加一个宏【EXPORTDLL class CSshowDlg】,有什么作用? 急求!!!Http代理客户端代码,vc编写,分全进去了!!! VC中如何生成一张透明的GIF图片
CStringW b = a;
wstring c = (LPCWSTR)b;
CString a;
CStringW b = a;
wstring c = (LPCWSTR)b;要加一点特点说明:
要求你的工程字符集设置为unicode 才行缺省为多字节。 .net 中设置方法: class view -> rclick: select property -> reqularly ....
如果是多字节: 用MultiByteToWideChar 转