Variable parameter macro

zhaozj2021-02-16  78

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-11507.html

New Post(0)