关于C语言中宏使用的苦恼......(是朋友就进来坐坐,急,高分相送)
各位老兄好:
我现在的想法是用宏定义一个不定参数的函数,
方法:
#define deg_printf(lin) printf lin
在应用中应用:
deg_printf( ("this is no %d", n) );
它等价于
printf ("this is no %d", n);
我现在的想法,是想把他输出到错误终端,
谁用好的想法??
不想这样: deg_printf( (stderr, "this is no %d", n) );
想这样: err_printf( ("this is no %d", n) );
这个宏怎么写?大家发表意见!!!