Compiler Error C2664

'function' : cannot convert parameter number from 'type1' to 'type2'

The specified parameter of the specified function could not be converted to the required type. If you’ve encountered this error on code which compiled with an earlier version of Visual C++, please read Technote: Improved Conformance to ANSI C++ for more information.

The following is an example of this error:

class A {} a;
func( int, A );
void main()
{
   func( 1, 1 );  // error, no conversion from int to A
}

Tips

Recheck the prototype for the given function and correct the argument noted in the error message. If necessary, an explicit conversion may need to be supplied.