cannot convert parameter 1 from 'const char [] ' to 'const wchar_t * '的解决方法

来源:互联网 发布:webservice json传递 编辑:程序博客网 时间:2024/06/06 01:39
CString a;
int b;
a.Format("%d", b);
出现cannot convert parameter 1 from 'const char [] ' to 'const wchar_t * '的错误

解决方法:
cannot   convert   parameter   1   from   'const   char   [3] '   to   'const   wchar_t   * '

从这个看你可能采用了UNICODE编码, 
可以用 
a.Format(L "%d ",   b); 
或者 
a.Format(_T( "%d "),   b);

0 0
原创粉丝点击