C++ Header Files

Header FilesDescription
alloc.hMemory management funtions
assert.hAssertion macros
bcd.hbcd and bcd math functions
bios.hBios functions like inpotrb, outportb, etc
complex.hMath functions for complex numbers
conio.hMS-DOS Console IO Functions
ctype.hCharacter Conversion Macros and Functions
dir.hDirectory and Path information Struct, Macros and functions
dirent.hPOSIX Directory functions
dos.hMS-DOS and 8086 specific functions
errno.hError Code Definitions
fcntl.hDefines constants used in library function open.
float.hFunctions realted to floating-point number.
fstream.hDeclares the C++ stream classes that support file input and output.
generic.hContains macros for generic class declarations.
graphics.hAll graphics related functions are declared here!
io.hContains structures and declarations for low-level input/output routines.
iomanip.hDeclares the C++ streams I/O manipulators.
iostream.hDeclares the basic C++ streams (I/O) routines.
limits.hContains environmental parameters and compile-time limitations
locale.hDeclares language-specific information.
malloc.hMemory management functions.
math.hDeclares prototypes for the math functions
mem.hDeclares the memory-manipulation functions.
memory.hMemory manipulation functions.
new.hAccess to operator new and newhandler.
process.hContains declarations for the spawn... and exec... functions.
search.hDeclares functions for searching and sorting.
setjmp.hDefines a type used by longjmp and setjmp.
share.hDefines parameters used in functions that use file-sharing.
signal.hDefines constants and declarations for signal and raise.
stdarg.hUsed to parse the variable number of arguments.
stddef.hDefines several common data types and macros.
stdio.hDefines types and macros needed for the Standard I/O rountines and stream-level I/O routines.
stdiostr.hDeclares the C++ (version 2.0) stream classes for use with stdio FILE structures.
stdlib.hStandard Library functions including conversion and search/sort routines
stream.hDeclares the C++ (version 1.2) streams (I/O) routines.
string.hDeclares several string and memory manipulation routines.
strstrea.hDeclares the C++ stream classes for use with byte arrays in memory.
sys\locking.hDefinitions for mode parameter of locking function.
sys\stat.hDefines symbolic constants used for opening and creating files.
sys\timeb.hDeclares the function ftime and the structure timeb that ftime returns.
sys\types.hDeclares the type time_t used with time functions.
time.hDefines a structure filled in by the time-conversion routines.
utime.hDeclares the functions utime and the structure utimbuf
values.hDefines important constants, including machine dependencies;
varargs.hDefines old style marcos for processing variable argumnet lists. Superceded by stdarg.h

Header File Inclusion Rules

Here, we discuss the basic rules of C++ header file inclusion needed to simplify header file management.

  • A header file should be included only when a forward declaration would not do the job.
  • The header file should be so designed that the order of header file inclusion is not important.
  • This is achieved by making sure that x.h is the first header file in x.cpp
  • The header file inclusion mechanism should be tolerant to duplicate header file inclusions.

Share this article on