VS2005 C++ str.Format 编译错误

 str.Format("5+3=%d",add(5,3));

error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char [7]' to 'const wchar_t *' c:/documents and settings/iamoyjj/my documents/visual studio 2005

改为,加L即可

str.Format(L"5+3=%d",add(5,3));

posted @ 2007-07-08 21:37  OYJJ  阅读(282)  评论(0编辑  收藏  举报