Variable parameter macro

xiaoxiao2021-03-06  142

The new C99 specification supports the macro of variable parameters, and the specific use is as follows:

The following is program code:

#include #include

#define logstrings (fm, ...) Printf (fm, __ va_args__)

INT main () {logstrings ("Hello,% D", 10); return 0;}

But it seems that only GCC is only supported.

转载请注明原文地址:https://www.9cbs.com/read-127709.html

New Post(0)