syntax error : missing 'token1' before 'token2'
The compiler expected a specific token (a language element other than whitespace) and found another token instead.
Possible causes
void main() { int j = 0; if (j < 25) // C2143, missing semicolon }
class X { int member } x; // error, missing ; on previous line
class X { int member; } x; class + {}; // error, + is an invalid tag name
void func1() { end: // error } // this line is not a statement void func2() { end: // OK ; // this label attached to null statement }
int i; // syntax error : missing ';' before 'division operator' int j; /* no error */
typedef [public] long MEMBERID;
it is not valid in a C++ source code file. Instead, you would need to issue:
[public] typedef long MEMBERID;
See Knowledge Base article Q241706 for information on this error when using a function-try block.
Check the C++ Language Reference to determine where code is syntactically incorrect. Since the compiler may report this error after the line that causes the problem, check the few lines of code that precede the error.