error C2556: 'void __thiscall......overloaded function
来源:互联网 发布:app数据分析什么软件好 编辑:程序博客网 时间:2024/05/18 22:44
此错误说明的是: 重载函数仅仅只有返回类型不同 这在c++中是不允许的 所以报出错信息
其实我并没有要将函数重载
class a
{
void Func(void);
}
class b
{
friend a::Func(void); // 应为 friend void a::Func(void);
}
编译器查找啊a::函数 找到void Func(void) 没有找到完全一样的 ,故而以为要重载这个函数。
可见,这个void也不是可以随便省略的 否则会报错
还有一个 bool BOOL
如果声明 用bool
定义用 BOOL
也是会报错的
- error C2556: 'void __thiscall......overloaded function
- error C2556: 'void __thiscall......overloaded function differs only by return type from 'int __thiscall
- error C2556: 'void __thiscall......overloaded function differs only by return type from 'int __thisc
- error C2556: 'void __thiscall ::sendCommand1(unsigned int,const char *,int)' : overloaded function differs only by return type f
- error C2511: send**** : overloaded member function 'void (
- 关于 overloaded function differs only by return type from 'void __thiscall 与类内实现
- error C2440:cannotconvertfrom 'void (__thiscall CMainFrame::*)'to'LRESULT(__thiscall CWnd::*)
- .obj : error LNK2005: "public: virtual void __thiscall
- error C2731: 'WinMain' : function cannot be overloaded
- error C2731: 'WinMain' : function cannot be overloaded
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CTrunkPage::* )(void)' to 'void (__thiscall CCmdTarget::* )(N
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)...
- error C2440 “static_cast” 无法从“void (__thiscall C* )(void)...
- error C2440 “static_cast” 无法从“void (__thiscall C* )(void)...
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)...
- error LNK2019 "public: void __thiscall std::_String_base::_Xran(void)const "
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)...
- error C2440: “static_cast”: 无法从“void (__thiscall CMainFrame::* )(void)
- 感想
- 失败的代名词——粗心
- 第一次来这里
- 数据结构指针
- 开源技术选型笔记
- error C2556: 'void __thiscall......overloaded function
- first day
- 一个DOM树形图
- ActiveX 控件
- jQuery UI v1.5 Released,代码重构到不认识
- 累!
- 集合类的使用
- set的使用
- 集合类简介