我不知道爲什麼會出現這個錯誤,我找不出它爲什麼顯示出來。有人請幫忙!在'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的回答。 –