Define macro in c++ with a suitable example....?
Answers
Answered by
3
All preprocessor directives begin with #, and only white-space characters may appear before a preprocessor directive on a line. Preprocessor directives are not C++ statements, so they do not end in a semicolon (;).
You already have seen a #include directive in all the examples. This macro is used to include a header file into the source file.
There are number of preprocessor directives supported by C++ like #include, #define, #if, #else, #line, etc. Let us see important directives −
Similar questions
Social Sciences,
7 months ago
Physics,
7 months ago
Geography,
1 year ago
Biology,
1 year ago
Math,
1 year ago
Computer Science,
1 year ago
Math,
1 year ago