VA ARGS

From Yefu's notes
Jump to: navigation, search

3.6 Variadic Macros 用可变参数宏

A macro can be declared to accept a variable number of arguments much as a function can. The syntax for defining the macro is similar to that of a function. Here is an example:

    #define eprintf(...) fprintf (stderr, __VA_ARGS__)

Source