AfxMessageBox出现错误error C2665

AfxMessageBox(("click"));

错误 error C2665: ‘AfxMessageBox‘ : none of the 2 overloads could convert all the argument types

解决方法:
AfxMessageBox(_T("click"));

解释:如果程序中define _UNICODE,则可用_T or _TEXT将后面的内容转为UNICODE格式字符串,否则和不用_T一样

或者就修改项目属性里面的字符编码

时间: 2024-08-01 14:33:18

AfxMessageBox出现错误error C2665的相关文章

编译luabind-0.9.1 出现 error C2665: 'boost::operator ==' : none of the 4 overloads could convert all the argument types 的解决方案

最终出错的位置是: #define LUABIND_OPERATOR_ADL_WKND(op) \  inline bool operator op( \      basic_iterator<basic_access> const& x \    , basic_iterator<basic_access> const& y) \  { \      return boost::operator op(x, y); \  } \ \  inline bool o

error C2665: “operator new” : 5个重载中没有一个可以转换参数1(从“const char [71]”类型)

error C2665: "operator new" : 5个重载中没有一个可以转换参数1(从"const char [71]"类型) 这个错误是怎么回事啊,搜索了整个项目好像没有可疑的new操作阿.这个错误是在将两个工程合并成一个过程中产生的.合并前没有这样的错误. MainFrm.cpp d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xmemory(34) : error C266

error C2665: “outtextxy”: 2 个重载中没有一个可以转换所有参数类型

错误描述 一些程序在 VC6 下运行好好地,但是放到 VC2008 及更高版本 VC 下编译却报错误(以下仅以 VC2008 举例,高版本 VC 类似),例如使用如下语句: outtextxy(10, 20, "Hello World"); 在 VC6 下可以成功编译,但在 VC2008 下编译后会有错误. 中文版错误提示如下: error C2665: “outtextxy”: 2 个重载中没有一个可以转换所有参数类型 英文版错误提示如下: error C2665: 'outtext

modelsim中,错误 Error: already declared in this scope ()

仿真软件modelsim中,错误 Error: already declared in this scope () 在定义这个信号前其它模块接口信号中调用了这个信号,modelsim仿真报错,通过把信号定义挪到调用模块前面问题解决. 可能是modelsim有要求,在块里边出现之前,必须先做声明.modelsim中,错误 Error: already declared in this scope (),布布扣,bubuko.com

Mysql添加用户错误:ERROR 1364 (HY000): Field &#39;ssl_cipher&#39; doesn&#39;t have a default value解决方法

添加用户 insert into mysql.user(Host,User,Password) values("localhost","test",password("1234")); 报以下的错误 ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value错误 mysql5.1以上版本,我是在5.6版本上操作的. 错语原因: mysql用户表的中某些字段不能为空,没有默

ubuntu下安装nginx错误error: the HTTP rewrite module requires the PCRE library 解决方法

本文为大家讲解的是ubuntu下安装nginx错误error: the HTTP rewrite module requires the PCRE library 解决方法,感兴趣的同学参考下. 本文为大家讲解的是ubuntu下安装nginx错误error: the HTTP rewrite module requires the PCRE library 解决方法,感兴趣的同学参考下. 错误描述: ubuntu安装nginx时提示error: the HTTP rewrite module r

[Android_Bug]Phonegap解决错误:Error initializing Cordova:Class not found

Phonegap  解决错误: Alert [ERROR]Error initializing Cordova:Class not found 发现bug后找原因   网上说是  因为找不到     res/xml  文件夹下的  config.xml 文件; 但我有这个config.xml 我想了一下 是不是因为没有找到指定的config.xml中的  feature配置 最后找到了   是因为我调用系统的 Device 信息 没有加标签 <!-- 设备 --> <feature na

jni 编译错误error: unknown type name &#39;__va_list&#39;

platforms\android-9\arch-arm\usr\include\stdio.h:257:37: error: unknown type name '__va_list' 解决方法: 默认的android-9不兼容 Applicaton.mk  添加APP_PLATFORM := android-21 jni 编译错误error: unknown type name '__va_list'

xliff:g 错误 error: Error parsing XML: unbound prefix

在安卓项目中使用 xliff:g ,按如下这样写 <string name="huiwutong_talk_limit"><xliff:g id="count_left" example="10">%1$s</xliff:g>个字</string> 出现了错误 error: Error parsing XML: unbound prefix ,原因是缺少xliff:g 的命名空间. 解决方法为: &