3.15 MULTI FILE PROGRAMS
Small programs are written in one file. When we write large programs, it becomes very inconvenient to use a single file. The solution is multi file programs. Here a big application program is split in many files. The splitting is normally logical. The constants and functions related to specific areas like input, output, graphics, etc. are put in specific files. These files are given extension “.h”. These files are included in the main program using #include pre-processor directive. The pre-compiled header files supplied by the compiler are specified by angular bracket, for example, #include <iostream.h>. We use double quotes, that is, #include “myfile.h” for files which we have created.
We said that splitting of files ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access