#include <iostream>
using namespace std;
int main(void)
{
cout << "__FILE__:" << __FILE__ << endl;//当前的文件名(绝对路径):C:\Users\xxx\source\repos\案例\宏\Source.cpp
cout << "__LINE__:" << __LINE__ << endl;//当前行: 10
cout << "__DATE__:" << __DATE__ << endl;//当前日期:Oct 24 2019
cout << "__TIME__:" << __TIME__ << endl;//当前时间:11:29:59
#ifdef __STDC__
cout << "__STDC__:" << __STDC__ << endl;/* use standard C future */
cout << "__STDC_VERSION__:" << __STDC_VERSION__ << endl;
#else
/* use extend C future */ //因为当前是用c++编译
cout << "不使用标准c" << endl;
#endif // __STDC__
cout << "__cplusplus:" << __cplusplus << endl;//c++的编译器版本:199711
#ifdef __OBJC
cout << "__OBJC__:" << __OBJC__ << endl;//测试是否使用object-c编译器编译还是c编译器编译
#else
cout << "不使用object-c编译器" << endl;
#endif // __OBJC
#ifdef __ASSEMBLER__
cout << "__ASSEMBLER__:"<<__ASSEMBLER__ << endl;//处理汇编时用到
/* 汇编代码 */
#else
cout << "不使用汇编代码" << endl;
#endif
return 0;
}