Could anybody please let me know how do I use predefined macros in the code?
I am trying the same thing mentioned in the tutorial
1 2 3 4 5 6 7 8 9 10 11
#include<iostream>
usingnamespace std;
int main()
{
cout << "this is line number\n"<<_LINE_<<endl;
cout << "of file\n"<<_FILE_<<endl;
cout << "at\n"<<_DATE_<<endl;
return 0;
}
However I get following error
std_directives.cpp:6:36: error: ‘_LINE_’ was not declared in this scope
std_directives.cpp:7:24: error: ‘_FILE_’ was not declared in this scope
std_directives.cpp:8:19: error: ‘_DATE_’ was not declared in this scope
I guess I am missing something here. Please explain. Thanks in advance :)