为什么我收到此错误消息?
Error: expected a ';'
从:
int main()
{
int score;
double distance;
char playAgain;
bool shieldsUp;
short lives;
short aliensKilled;
score = 0
distance = 1200.76;
playAgain = 'y';
shieldsUp = true;
lives = 3
aliensKilled = 10;
错误位于distance = 1200.76;
和aliensKilled = 10;
,
答案 0 :(得分:1)
你有:
score = 0
你想:
score = 0;
类似于lives = 3
答案 1 :(得分:1)
你真的忘记了一些事情:
...
score = 0;
...
lives = 3;
...