errors.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Error Message
                                                  Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     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 the following:
 
          void func1( void )
          void main( void )
          {
          }
 
     With the semicolon missing, the compiler assumes that <func1> is a
     function definition, not a prototype, and that the function main
     is being defined within the function <func1>. It generates C2085
     on the identifier 'main'.
                                    -♦-