May 2012
Intermediate to advanced
679 pages
16h 56m
English
There are many directives for the pre-processor. However, the most common are:
Directive # include will instruct the compiler to include the specified file as a part of the program under compilation. You must have included “stdio.h” file in every C program, which you have written. In C++, we include “iostream.h” in practically every program (instead of stdio.h). In multi-file programs, we compile the main program file. However, other files are also part and parcel of that program. Hence, #include is useful in that case too.
The directive #define is also a very common directive. It defines a macro. The simplest use is to define constants. For example:
#define MAX 100
will textually substitute 100 ...
Read now
Unlock full access