Compiler Error C2059

syntax error : 'token'

The token caused a syntax error. Problems of this type can sometimes be attributed to a syntactical or clerical error. For example:

void main (             // No closing parenthesis.
{

}

In the preceding example, the error message will be generated for the line which contains the open curly bracket, although the true source of the error appears on the line just above. As a general rule, make sure to also examine the lines above the line listed in the error message when trying to determine the cause.

Tips