standard macro names: __LINE__, __DATE__, __cplusplus : Macro Expansion « Development « C++ Tutorial






#include <iostream>
using namespace std;

int main()
{
  cout << "This is the line number " << __LINE__;
  cout << " of file " << __FILE__ << ".\n";
  cout << "Its compilation began " << __DATE__;
  cout << " at " << __TIME__ << ".\n";
  cout << "The compiler gives a __cplusplus value of " << __cplusplus;
  return 0;
}








5.18.Macro Expansion
5.18.1.function macro
5.18.2.standard macro names: __LINE__, __DATE__, __cplusplus
5.18.3.Macro Expansion