Home > SparkCharts > Cs > C++ > Include Files

C++


 
 

Include Files

A programmer can include multiple additional files in a C++ program. These files, called include files, are used to access libraries or to break a program into multiple parts. For defined files of the C++ standard library, such files are included using the #include statement and the name of the file excluding the -h part of the file name.

iostream include statement example:

#include <iostream>

It is also possible to include other files that are not part of the standard libraries. These are included using the following style of statement:

Non-standard library include statement:

#include "include file.type"

Note that recursive inclusions will cause problems and should be avoided.