int之前应为不合格id
expected unqualified-id before int
当我试图编译它时,我在c++中得到了这个错误"在int之前应该是不合格的id"。
void yearlyWithdrawal(int startingAge, int numOfYears), int yearlyAmount, double interestRate)
{
int age = startingAge;
int lastAge = startingAge + numOfYears;
double cash = yearlyAmount;
cout << "Age | Yearly Plan" << endl;
cout << "----+----------------" << endl;
while (age <= lastAge)
{
cout.width(3);
cout << age << " | ";
cout.width(15);
cout.precision(2);
cout.setf(ios::fixed);
cout << cash << endl;
if (age != lastAge)
cash = cash + cash*interestRate / 100.0;
age++;
}
system("pause");
}
我试图找出哪里出了问题,但没能找到。
提示:
void yearlyWithdrawal(int startingAge, int numOfYears), int yearlyAmount, double interestRate)
// --------------------------------------------------^
void yearlyWithdrawal(int startingAge, int numOfYears), int yearlyAmount, double interestRate)
此行中间的)
可能是an int'之前的问题的明显指针。
相关文章:
- 方法内部但循环仍得到预期的不合格id错误C++
- C 预期的不合格ID(类继承)
- 解析问题:预期的不合格的ID和语义问题:C 需要所有声明的类型说明符
- 字符串常量(包括ZenLib/Ztring.h)之前应为不合格id
- Arduino-应为不合格的id
- int之前应为不合格id
- while c++之前应为不合格id
- 预期的不合格id错误,很可能是原因
- 标头C++中应为不合格Id
- 不合格的ID和模板类
- C++中类出现预期的不合格id错误
- QDir目录之前应为不合格的id
- 第25行应为不合格的-id,我该如何更正
- 错误:“int”之前应为不合格的id
- iOS中出现不合格的id错误
- 奇怪的模板错误:应为不合格id
- C++:错误:在“!”之前应为不合格的id代币
- 错误:在if之前需要不合格的id
- 不合格的id错误和井字游戏板不工作
- 在int j之前预期的不合格id.我知道它可能偏离主题,但我找不到错误