Header Filenames
Files such as iostream
are called include files (because they are included in other files) or header files (because they are included at the beginning of a file). C++ compilers come with many header files, each supporting a particular family of facilities. The C tradition has been to use the h
extension with header files as a simple way to identify the type of file by its name. For example, the C math.h
header file supports various C math functions. Initially, C++ did the same. For instance, the header file supporting input and output was named iostream.h
. But C++ usage has changed. Now the h
extension is reserved for the old C header files (which C++ programs can still use), whereas C++ header files have no extension. There ...
Get C++ Primer Plus now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.