Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 760 Bytes

compiler-error-c2085.md

File metadata and controls

31 lines (24 loc) · 760 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2085
Compiler Error C2085
11/04/2016
C2085
C2085
0a86785c-8e6f-481b-8c7b-412220c1950d

Compiler Error C2085

'identifier' : not in formal parameter list

The identifier was declared in a function definition but not in the formal parameter list. (ANSI C only)

The following sample generates C2085:

// C2085.c
void func1( void )
int main( void ) {}   // C2085

Possible resolution:

// C2085b.c
void func1( void );
int main( void ) {}

With the semicolon missing, func1() looks like a function definition, not a prototype, so main is defined within func1(), generating Error C2085 for identifier main.