Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 710 Bytes

compiler-warning-level-1-c4003.md

File metadata and controls

29 lines (24 loc) · 710 Bytes
description title ms.date f1_keywords helpviewer_keywords
Learn more about: Compiler Warning (level 1, Error) C4003
Compiler Warning (level 1, Error) C4003
11/04/2016
C4003
C4003

Compiler Warning (level 1, Error) C4003

not enough arguments for function-like macro invocation 'identifier'

The number of formal parameters in the macro definition exceeds the number of actual parameters in the macro. Macro expansion substitutes empty text for the missing parameters.

The following sample generates C4003:

// C4003.cpp
// compile with: /WX
#define test(a,b) (a+b)

int main()
{
   int a = 1;
   int b = 2;
   a = test(b);   // C4003
   // try..
   a = test(a,b);
}