我不知道为什么会出现这个错误,我找不出它为什么显示出来。有人请帮忙!在'not'令牌之前预期的非限定标识C++
#include <iostream>
using namespace std;
int not(int x){
cout << Enter your number;
cin >> x;
if(x==1){
return 1;
}
else{
return x * (x-1);
}
}
int main(5)
{
cout << not();
}
编辑:如果有帮助,错误是在第5行。
'INT主(5)'?错字? –
'cout << not();''not' should be called with argument。 – Ari0nhh
@ Ari0nhh,比这更糟糕。看Nicky的回答。 –