VC error C4430 和 C2533 错误
来源:互联网 发布:c语言编程学校 编辑:程序博客网 时间:2024/05/29 03:55
昨晚调试个程序,被这破问题搞了大半夜。
因为我在 .h 和 .cpp 文件中使用了 static 的类全局变量,需要在类构造前对这些变量进行初始化
开始的时候 Visual Studio 编译老提示我:
错误 1 error C2143: 语法错误 : 缺少“;”(在“CXGdiplus::m_uGdiplusStatus”的前面) d:/cppcsprjs/gdiplusdemo/xgdiplus.cpp 32 GdiplusDemo
错误 4 error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int d:/cppcsprjs/gdiplusdemo/xgdiplus.cpp 32 GdiplusDemo
于是一点点排查,最后几乎把所有的代码都快注释掉了,这次 Visual Studio 提示我:
错误 1 error C2533: “CXGdiplus::{ctor}”: 构造函数不能有返回类型 d:/cppcsprjs/gdiplusdemo/xgdiplus.cpp 41 GdiplusDemo
于是搜索了一下,终于发现原来是我用 UE 敲代码的时候,那个 .h 文件 class 声明结尾的 "}" 之后还有个分号 ";" 被我不小心漏掉了。
折腾了这大半夜竟然是这低级错误,郁闷死。
所以特意把这个贴出来,警示自己不要再犯了 ⊙﹏⊙b汗
- VC error C4430 和 C2533 错误
- VC error C4430错误解决方法
- error C2146 和C4430 错误
- 错误: error C2533
- error C2146:和error C4430:的错误
- error C2146:和error C4430:的错误
- [VC]关于古怪的 error C2533:
- vc++ error C2533:“*”构造函数不能有返回类型
- 错误3error C4430: 缺少类型说明符
- C2146和C4430错误:循环引用错误
- 添加的dshow_h错误: ctlutil.h(278) : error C4430
- error C2061 && error C4430
- C++常见错误调试LNK2019\LNK2001\LNK2005\error C2533\0xcdcdcd
- C++编程隐蔽错误:error C2533: 构造函数不能有返回类型
- C++编译错误:error C2533: 构造函数不能有返回类型
- C++编译错误error C2533:构造函数不能有返回类型
- C++编译出现 错误1error C2533: “TA::{ctor}”: 构造函数不能有返回类型
- MFC中的error C2146和C4430:atlcom.h
- Matlab画图入门
- WinCE中nandflash驱动开发介绍
- 剖析Linux系统启动过程
- How To Solve Flickering Background Images
- 小猪戏说PHP语言中global和$GLOBALS[]的区别
- VC error C4430 和 C2533 错误
- ILdasm 的使用
- 关于vs 2005发布网站时的文件覆盖问题
- 测试用Windows Live Writer写blog
- [转载]给即将工作的人九条建议
- 酒肆老板娘的难题
- Google在线翻译(WinForm版)
- 罗素与《自由之路》
- 人格特质决定价值取向