Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define DBG_INFO1(fmt, args...) printf("[Info]" fmt, ##args) // GCC扩展的特性
- #define DBG_INFO2(fmt, ...) printf("[Info]" fmt, ##__VA_ARGS__)
- #define DBG_INFO3(fmt, ...) printf("[Info]" fmt, __VA_ARGS__)
- int main()
- {
- DBG_INFO1("123");
- DBG_INFO1("123%s", "abc");
- DBG_INFO2("123");
- DBG_INFO2("123%s", "abc");
- // DBG_INFO3("123"); // 报错
- DBG_INFO3("123%s", "abc");
- return 0;
- }
Add Comment
Please, Sign In to add comment