在 Netbeans IDE 8.0.2 中使用(低于分数)"_"
Using (under score) "_" in Netbeans IDE 8.0.2
在头文件中我有一个函数
typedef std::vector<double> 1DVector
typedef std::vector<1DVector> 2Dvector
static void FuncA(2DVector& M, 2DVector& S, 2DVector& MSI);
.cpp文件
void ClassTemp::FuncA(2DVector& _M, 2DVector& _S, 2DVector& _MSI);
我使用netbeans IDE 8.0.2。当我编译这段代码时,我得到的错误如下
error: expected ',' or '...' before numeric constant
error: prototype for void void ClassTemp::FuncA(2DVector& _M, 2DVecto
r& _S, 2DVector& _MSI) does not match any in class ClassTemp.
error: candidate is void ClassTemp::FuncA(2DVector& _M, 2DVector& _S, 2DVector& _MSI)
我在网上搜索,发现这与_
有关,但之前我成功地用netbeans IDE 7.4编译了这段代码。任何帮助都将不胜感激。
我正在用arm-linux-androideabi-g++
编译器编译
在C和c++中,以下划线后大写字母开头的名称(例如_M
)保留用于语言实现。它们可以是#define
- d宏或用于内部语言实现类和函数的名称。因此,您不应该在自己的代码中使用它们,否则您可能会遇到奇怪的问题。我怀疑这就是问题所在。
尝试重命名变量以使用小写的m
或去掉下划线。(提醒一下,同样的规则也适用于以两个下划线开头的名称,所以不要尝试在前面添加另一个下划线。^ _ ^)
希望这对你有帮助!
相关文章:
- C++:如何在CLion IDE中安装Boost
- NetBeans IDE 8.2 C++字符串声明问题
- Netbeans IDE 7.2.1:如何添加C 升压库
- 如何在 Emacs 中自动格式化代码,就像在 Netbeans IDE 中一样
- 我的IDE使用的是什么C++实现/库?(NetBeans、MacOSX)
- 不能在Netbeans IDE 7.2中包含队列/堆栈C++STL类
- 如何在Netbeans C++IDE中获取堆栈跟踪
- 在 C++ 中,Netbeans IDE 抛出"Unable to resolve identifier String"
- Netbeans IDE、测试和调试测试中 C++ 项目中的构建/清理和构建之间的区别
- 用于C++的Netbeans IDE如何指定命令行参数
- 使用 Netbeans IDE 7.0.1 进行C++,如何启用更多调试信息(即与 gdb "-g3"一样)
- 线程c++11标准和Netbeans/其他IDE
- Winpcap Developer Usage with Cygwin C++ & Netbeans IDE
- 无法在 NetBeans IDE 中编译C++ - 出现错误"CreateProcess error=193, %1 is not a valid Win32 application"
- jni.h:没有这样的文件或目录Netbeans IDE
- 集成Qt框架,Netbeans IDE, Visual Studio c++编译器
- NetBeans IDE:"Run Success"输出在输出完成之前发生
- Netbeans IDE 8.0.2 C++代码辅助问题映射与向量值声明
- 使NetBeans包含IDE知道的目录
- 在 Netbeans IDE 8.0.2 中使用(低于分数)"_"