expected primary-expression before ')' token
时间: 2023-11-15 20:06:14 浏览: 90
expected primary-expression before token (解决方案).md
This error message is typically encountered in programming languages like C++ and Java, and it occurs when the compiler encounters a ')' symbol where it does not expect it to be.
The most common causes of this error message are:
1. Missing opening parentheses: The code may have a closing parentheses without an opening parentheses to match it.
2. Incorrect function or method call: The code may have an incorrect function or method call that is missing a parameter or has too many parameters.
3. Incorrect syntax: The code may have incorrect syntax, such as a missing semicolon or other syntax error.
To resolve this error, check the code for any missing parentheses, incorrect function or method calls, or syntax errors. Make sure that all parentheses are properly matched and that any function or method calls have the correct number of parameters.
阅读全文