`
kimmking
  • 浏览: 537169 次
  • 性别: Icon_minigender_1
  • 来自: 中华大丈夫学院
社区版块
存档分类
最新评论

vc8的一些小问题

阅读更多

error C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types e:\study\vc\fileassist\httputils.cpp 110 

 

vc8比vc6和vc7更严格了,默认的'AfxMessageBox' 的参数需要是使用_T()转型。

---------------------------

error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char [19]' to 'const wchar_t *' e:\study\vc\fileassist\httputils.cpp 167 

 

error C2664: 'CFtpConnection::Command' : cannot convert parameter 1 from 'const char [3]' to 'LPCTSTR' e:\study\vc\fileassist\ftputils.cpp 48 

error C2440: 'initializing' : cannot convert from 'const char [1]' to 'ATL::CStringT<BaseType,StringTraits>' e:\study\vc\fileassist\ftputils.cpp 60 

 

CString初始化,Format,一些api的参数等等都需要先用_T()转型

对于一个稍微大点的项目,开发工具或是mfc升级,这个问题很麻烦。微软怎么想的?

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics