`

VS2005使用多字节字符集问题

 
阅读更多
1>------ 已启动生成: 项目: psgdatatotxt, 配置: Debug Win32 ------
1>正在编译...
1>stdafx.cpp
1>正在编译...
1>psgdatatotxt.cpp
1>psgdatatotxtDlg.cpp
1>d:\projects\psgdatatotxt\psgdatatotxt\psgdatatotxtdlg.cpp(59) : error C2664: “void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)”: 不能将参数 1 从“const char [3]”转换为“const wchar_t *”
1>        with
1>        [
1>            BaseType=wchar_t,
1>            StringTraits=StrTraitMFC_DLL<wchar_t>
1>        ]
1>        与指向的类型无关;转换要求 reinterpret_cast、C 样式转换或函数样式转换
1>d:\projects\psgdatatotxt\psgdatatotxt\psgdatatotxtdlg.cpp(167) : error C2664: “atoi”: 不能将参数 1 从“CString”转换为“const char *”
1>        没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符
1>d:\projects\psgdatatotxt\psgdatatotxt\psgdatatotxtdlg.cpp(182) : warning C4244: “=”: 从“ULONGLONG”转换到“int”,可能丢失数据
1>正在生成代码...
1>生成日志保存在“file://d:\projects\psgdatatotxt\psgdatatotxt\Debug\BuildLog.htm”
1>psgdatatotxt - 2 个错误,1 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========


右击当前项目,选择属性,在项目默认值下面的“字符集”选项改为“使用多字节字符集”就可以了。这是多种编程语言标准不统一造成的。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics