#include <iostream>
#include <string>
using namespace std;
void _tmain(int argc, TCHAR *argv[])
{
int line = __LINE__;
string filename = __FILE__;
cout<<"the line is:"<<line<<endl;
cout<<"the filename is :"<<filename<<endl;
system("pause");
}
C/C++ 获取代码执行的行数以及文件名
时间: 2024-10-21 20:33:09