比如我定义了
#define DEBUG(str) printf( "error:%s\nin file:%s Line:%d\n", (str) , __FILE__ ,__LINE__ ) ;\
fflush(stdout); \
decodeError = 1
那么在使用 DEBUG宏时,需要注意是否会产生歧义
比如
if(...)
{
...
}
else DEBUG("错误!!");
这个句子 就不会执行 fflush(stdout); decodeError = 1这两句 而在if语句之后把他们执行了