In this preprocessor directive it tells the compiler to include a file in the source code.
THERE ARE TWO TYPES OF FILES WHICH CAN BE INCLUDED BY THE USER IN A PROGRAM:
1. HEADER FILE
The header files contains the definition of predefined functions like cin, cout, etc. These files must be included for working with these functions; different functions are declared in different header files. For example functions which perform string operations are in ‘string’ file.
In this syntax the filename is the name of the file that to be included. The ‘<’ and ‘>’ brackets tells the compiler to check for the file in the standard directory.
2. USER DEFINED FILES
When the program is very large so it is good to divide it into smaller files and include whenever needed. These types of files are user defined files.
- Conditional Compilation: The conditional compilation directives are type of directives which helps to compile a specific code of the program or to skip compilation of some specific part of the program based on some conditions. We can perform this with the help of two preprocessing commands ifdef and endif.