C里就已经有这些宏,可以用于记录log,测试如下:
cout << "log in "<< __FILE__ << " : " << __FUNCTION__ <<" line: " << __LINE__ << endl;
// 输出: log in d:\tmp\test\test_sizeof.cpp : test line: 10
C里就已经有这些宏,可以用于记录log,测试如下:
cout << "log in "<< __FILE__ << " : " << __FUNCTION__ <<" line: " << __LINE__ << endl;
// 输出: log in d:\tmp\test\test_sizeof.cpp : test line: 10