Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/136.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 使用(低于分数)“_&引用;在Netbeans IDE 8.0.2中_C++_Netbeans - Fatal编程技术网

C++ 使用(低于分数)“_&引用;在Netbeans IDE 8.0.2中

C++ 使用(低于分数)“_&引用;在Netbeans IDE 8.0.2中,c++,netbeans,C++,Netbeans,在头文件中,我有一个函数 typedef std::vector<double> 1DVector typedef std::vector<1DVector> 2Dvector static void FuncA(2DVector& M, 2DVector& S, 2DVector& MSI); 我正在使用netbeans IDE 8.0.2。当我编译这段代码时,会出现如下错误 error: expected ',' or '...' befor

在头文件中,我有一个函数

typedef std::vector<double> 1DVector
typedef std::vector<1DVector> 2Dvector
static void 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)
我在网上搜索并发现这与
\uuuu
有关,但之前我用netbeans IDE 7.4成功编译了这段代码。任何帮助都将不胜感激

编辑:


<>我编译的是< ARM-LIUX-ANDRODABI+G++< /Cult>编译器。< /P> < P> C和C++,从下划线开始的名字后面跟着大写字母(例如,<代码>μm <代码> >,这是为语言实现保留的。它们可以是
#define
d宏或用于内部语言实现类和函数的名称。因此,您不应该在自己的代码中使用它们,否则您可能会遇到奇怪的问题。我怀疑这就是问题所在

尝试重命名变量以使用小写字母
m
,或删除下划线。(作为提示,相同的规则适用于以两个下划线开头的名称,因此不要尝试在前面添加另一个下划线。^u^)


希望这有帮助

是的,还有一个问题,那为什么它是用IDE7.4编译的呢?事情从7.4变为8.0.2?@SaadSaadi它的实现定义了,我相信,这个模式的名称做了什么,所以它很可能在一个编译器上工作,而不是在另一个编译器上。基本上,您做了一些不能保证工作的事情,因此在一种情况下它碰巧工作,而在另一种情况下它碰巧不工作。我认为它不依赖于Netbeans版本。这也取决于编译器。对于7.4版本,我使用
armlinux gnueabigf
编译器编译。
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)