Compiler Warning (level 1) C4020

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see Compiler Warning (level 1) C4020 on docs.microsoft.com. 'function' : too many actual parameters

The number of actual parameters in a function call exceeds the number of formal parameters in the function prototype or definition. The compiler passes the extra actual parameters according to the calling convention of the function.

The following sample generates C4020:

// C4020.c  
// compile with: /W1 /c  
void f(int);  
int main() {  
   f(1,2);   // C4020  
}  

Possible resolution:

// C4020b.c  
// compile with: /c  
void f(int);  
int main() {  
   f(1);  
}  

Show: