预定义宏

来源:互联网 发布:卖产品的软件 编辑:程序博客网 时间:2024/05/03 19:37
#include <iostream>using namespace std;int main (void) {cout<<__LINE__<<endl;  //当前行cout<<__FILE__<<endl;  //当前文件cout<<__DATE__<<endl;  //当前日期cout<<__TIME__<<endl;  //当前源文件编译时间cout<<__TIMESTAMP__<<endl;  //当前源文件最后一次修改时间//通常用在多个cpp文件,增量编译的时候getchar();return 0;}/*2015年3月2日17:53:20程序执行输出结果如下:8d:\个人资料\我的文档\visual studio 2008\projects\1\1\main.cppMar  2 201517:52:53Mon Mar  2 17:52:52 2015*/

0 0
原创粉丝点击