首页 > 试题广场 >

说下这段代码中, do{...}while(0) 的作用。

[问答题]

说下这段代码中, do{...}while(0) 的作用。
#define NSLog(format,...) do {

fprintf(stderr,”<%s:%d>%s\n”,

[[[NSString stringWithUTF8String:_FILE_]lastPathComponent]UTF8String],

_LINE_,_func_);

(NSLog)((format),##_VA_ARGS_);

fprintf(stderr,” \n”);

}while(0)


输出哪行有bug ?
发表于 2017-04-12 13:15:29 回复(0)