当前位置: 首页 > 工具软件 > mylog > 使用案例 >

myLog.h

樊令秋
2023-12-01
#include<stdio.h>
#define Log(fmt,...) printf("%s/%d::"fmt"\r\n",__FILE__,__LINE__,##__VA_ARGS__)
 

#define while_safe(bExp) int cnt = 20; while(bExp && (--cnt >0) ? 1 : (Log("dead loop"),0))

int main(){
	while_safe(1){
		Log("test");
	}
	return 0;
}


 类似资料:

相关阅读

相关文章

相关问答