Include File

Meaning – The term ‘include file’, refers to the text file that contains declarations used by a group of functions, programs, or users.

Many programming languages and other computer files have a directive, often called ‘include’, that causes the contents of a second file to be inserted into the original file. These included files are called copybooks or header files. They are often used to define the physical layout of program data, pieces of procedural code, and/or forward declarations while promoting encapsulation and the reuse of code.

The include directive inserts the contents of a specified file into the text stream delivered to the compiler. Usually, standard headers and global definitions are included in the program stream with the include directive.

Example of usage“The include preprocessor directive is used to paste code of given file into the current file. It is used to include system-defined and user-defined header files. If included file is not found, the compiler renders an error.”