expected expression before ‘int’
时间: 2023-09-29 16:03:28 浏览: 321
expect
5星 · 资源好评率100%
This error message typically occurs when there is a syntax error in the code. It usually means that there is a missing semicolon or an incorrect use of braces, brackets, or parentheses.
For example, if you have written:
```
int num
int main(){
return 0;
}
```
The error message would be "expected expression before 'int'". This is because you forgot to add a semicolon after `int num`.
To fix this error, you simply need to add the missing semicolon:
```
int num;
int main(){
return 0;
}
```
阅读全文