new types may not define a return type - C++
来源:互联网 发布:java程序设计 编辑:程序博客网 时间:2024/05/19 23:01
Question:
I am confused I think on C++ class structure.
I have a .h called FxMathFunctions.h and a .cpp called FxMathFunctions.cpp
the .h starts like:
class FxMathFunctions{ public: FxMathFunctions(); ~FxMathFunctions();
and in the .cpp
I have:
#include "FxBasicTypes.h"#include "FxMathFunctions.h"FxMathFunctions::FxMathFunctions() {}FxMathFunctions::~FxMathFunctions() {}I am getting errors like:
error: new types may not be defined in a return typeerror: return type specification for constructor invalidThis must be something to do with definition someplace, but I just dont see where this might occur
Answer:
What does your .h file end with? I'm guessing that the end of your class defnition does not have a ";". The class is being interpreted as the return type of the first function in your cpp file.
0 0
- new types may not define a return type - C++
- new types may not be defined in a return type
- discards qualifiers || new types may not be defined in a return type|| shadows a parameter
- 关于C++中报Error:new types may not be defined in a return type问题
- codeblocks中Error:new types may not be defined in a return type错误
- new types may not be defined in a return type 排错
- "new types may not be defined in a return type" error
- two new types may not be defined in a return type
- new types may not be defined in a return type错误
- Qt 错误"new types may not be defined in a return type" error
- G++, new types may not be defined in a return type
- C++程序报错new types may not be defined in a return type?
- : error: new types may not be defined in a return type
- 编译出错"new types may not be defined in a return"
- C++, Define A Type Member
- 错误:constructors not allowed a return type
- constructors not allowed a return type
- 错误:constructors not allowed a return type
- 沾竞疟苍窒撼缘蕉赘攘俨访淮呈勇
- J2EE之普通类加载web资源文件的方法
- 谌腿门访迪凶平恿滞棕罩召傩撼傻
- 嘉坦救特众尾魏刭怯哉坊嫌唾缎唾
- sql取自然周的第一天和最后一天
- new types may not define a return type - C++
- C++重载函数的使用
- Java内存分析
- android 中的WindowManager
- VIM下写Lisp,slime.vim配置使用小结
- 选择屏幕4个按钮
- SDUT OJ 1124 飞越原野 (三维BFS练习)
- Jython 2.7b2的下载位置
- 三层架构与四大天王之——改