__LINE__的用法

简单的说,__LINE__可以获取当前代码的函数,结合__FUNCTION__可以打印调试信息,比如函数出错时运行的函数名,及行号,例如

1 #define p_err_fun do{printf("[E: %d.%03d] ",  os_time_get()/1000, os_time_get()%1000);printf("%s err in %d
", __FUNCTION__, __LINE__); printf("
");}while(0)
原文地址:https://www.cnblogs.com/10cm/p/6612773.html