C语言中,__FILE__、__LINE__、__func__用法
具体例子如下:
1 // test.c 2 #include <stdio.h> 3 int main(int argc, char *argv[]) 4 { 5 printf("this is source-file %s, func %s, lines %d\n", 6 __FILE__, __func__, __LINE__); 7 return 0; 8 }
执行结果如下:

具体例子如下:
1 // test.c 2 #include <stdio.h> 3 int main(int argc, char *argv[]) 4 { 5 printf("this is source-file %s, func %s, lines %d\n", 6 __FILE__, __func__, __LINE__); 7 return 0; 8 }
执行结果如下:
