到目前为止,VS 完美地编译了我的代码,但现在 VS2015 向我显示了一个我无法理解的警告。
我的代码:
CString nombre=_T("Stack"), dsc=_T("overflow");
_ftprintf(file, _T("%s %s);\n"), nombre, m_dsc);
和 VS2015:
Warning C4477 'fwprintf' : format string '%s' requires an argument of type 'wchar_t *', but variadic argument 1 has type 'CString'
为什么?,为什么我不能使用 CString 而不是 wchart_t?。我想使用 CString
提前致谢
约瑟米
最佳答案
_ftprintf(file, _T("%s %s);\n"), (LPCTSTR)nombre, (LPCTSTR)dsc);
关于c++ - VS2015 现在错误 C4477 "fprintf",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32481128/