MFC:csting Intellisense:没有过载函数的实例

MFC: CSting IntelliSense: no instance of overloaded function

本文关键字:函数 实例 没有过 csting Intellisense MFC      更新时间:2023-10-16

当我将int转换为cstring时,源代码如下

int count = 0;
CString msg;
msg.Format("%d", count); // error

错误杂物是

IntelliSense:没有超载函数的实例
" atl :: cstringt ::格式[带有
basetype = wchar_t,stringTraits = trtraitmfc_dll atl :: chtraitscrt>]"匹配参数列表
参数类型是:(const char [4])对象类型是:
cstring

如何解决此问题?

in _t()

中的"%d"
msg.Format(_T("%d"), count);