Compiler Error C2085

'identifier' : not in formal parameter list

The identifier was declared in a function definition but not in the formal parameter list.

A common cause of this error is the omission of a semicolon (;) at the end of a function prototype, as in:

void func1( void )
void main( void )
{
}

With the semicolon missing, func1() is taken to be a function definition, not a prototype. This means the function main() is being defined within func1(). Error C2085 is generated for the identifier main.

This is an error in ANSI C only.