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

来源:互联网 发布:4行4列矩阵的值怎么求 编辑:程序博客网 时间:2024/06/05 16:35
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);

来自:http://blog.sina.com.cn/s/blog_616d3ec20100yeas.html

0 0