中国开发网: 论坛: 程序员情感CBD: 贴子 476509
holly
ok
#define myprintf(level, x) \
{ \
if ( (level) <= DEFAULT_LEVEL ) \
printf x; \
}

When we want to call...

myprintf(DEBUG_LEVEL, ("We got this debug message with an int %d and string %s\n", 23, "String arg"));

Very simple and portable.

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录