This documentation is archived and is not being maintained.

Compiler Error C2660

'function' : function does not take number parameters

The function is called with an incorrect number of parameters.

The following sample generates C2660:

// C2660.cpp
void func( int, int );
int main()
   func( 1 );     // C2660, func( int ) not declared
   func( 1, 0 );  // OK, func( int, int ) was declared

  • Accidentally calling a Windows API function rather than an MFC member function of the same name. To solve this problem:
    • Adjust the function call to conform to the format of the member function call.
    • Use the scope resolution operator (::) to tell the compiler to seek the function name in the global name space.