打印当前源文件的文件名以及源文件的当前行号

// __FILE__与__LINE__是系统预定义宏,由编译器定义的
cout << __FILE__;
cout << __LINE__;
原文地址:https://www.cnblogs.com/yingl/p/5817419.html