码迷,mamicode.com
首页 > 其他好文 > 详细

cannot convert parameter 1 from 'const char [] ' to 'const wchar_t *

时间:2017-10-18 19:43:12      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:convert   unicode编码   size   style   family   har   code   not   cannot   

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);

cannot convert parameter 1 from 'const char [] ' to 'const wchar_t *

标签:convert   unicode编码   size   style   family   har   code   not   cannot   

原文地址:http://www.cnblogs.com/chay/p/7688113.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!