Compiler Error C2660

'function' : function does not take number parameters

The specified function was called with an incorrect number of actual parameters.

Tips

  • The most typical cause of this error is calling a function with the incorrect number of actual parameters. The following example demonstrates this:

    void func( int, int );
    void main()
    {
       func( 1 );     // error, func( int ) not declared
       func( 1, 0 );  // OK, func( int, int ) was declared
    }
    
  • A problem similar to the one shown above occurs when you mistakenly call a Windows API function directly from within an MFC member function, rather than calling the equivalent MFC member function of the same name. Since the two functions are identical in name this error may occur frequently. Either of the two following methods will solve this error:

    • Adjust the function call to conform to the format of the member function call.

    • Use the scope resolution operator (::) to tell the compiler to look for the function name in the global name space.