我是 C++ 新手,正在练习练习。我使用 CodeBlocks IDE。
#include <iostream>
using namespace std;
int main() {
double f;
double m;
int counter;
counter = 0;
for (f = 1.0, f <= 100.0, f++) { // error: expected primary-expression before ')'
m = f / 3.28;
cout << f << " feet is " << m << " meters!\n done";
counter++;
if (counter == 10) {
cout << "\n";
counter = 0;
}
}
cin.ignore();
cin.get();
return 0;
}
每次我把它放在我的 IDE 中,我都会收到以下错误:
error: expected primary-expression before ')' token
谁能指出我正确的方向?