C++ 打印文件名, 行号,编译日期和时间例子

来源:互联网 发布:python标准文档 编辑:程序博客网 时间:2024/05/16 01:31
/*********************************************************************************   Copyright (C), 1988-1999, drvivermonkey. Co., Ltd.   File name:    Author: Driver Monkey   Version:    Mail:bookworepeng@hotmail.com   Date: 2014.04.02   Description:    *********************************************************************************/  #include <iostream>#include <sstream>#include <fstream>using namespace std;/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char** argv) { cout<<__LINE__<<endl;//打印行号  cout<<__FILE__<<endl;//打印文件名  cout<<__DATE__<<endl;//打印日期  cout<<__TIME__<<endl;//打印时间 }

0 0
原创粉丝点击