There are mainly four types of Pre-processor directives in C++ programming language, and they are: -
The macros in C/C++ programming language are one of the most exciting concepts. These are the sentences written in C++ code with the help of #define, and whenever the allocated variable is called, the value associated will be swapped and executed.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Macros with parameters C++ code
The area of the object similar to a rectangle is: 10850
2. File Inclusion
This is one of the often-seen C++ Preprocessors as we use it daily, including some built-in libraries essential for our daily basic programming needs.
3. Conditional Compilation
The Conditional unique compilation and preserved directives are an essential and integral part and parcel type of directives that help us to compile and run the specific portion of the program or a code snippet seamlessly to skip the compilation of some particular part of the program based on some conditions.
4. Other directives
Apart from the directives in our C++ programming language, there are two mostly unknown and not so used directives #undef Directive, #pragma startup and #pragma exit: directives. Their implementation is given below
/tmp/ Lj D4 TT sh NS.o Hello, coder on javaTpoint.com. We are inside the int primary () function now.
hello coder we are currently inside the function_1_is() hello coder, we are currently inside the int main() function hello coder we are currently inside the function_2_is()