Header Files





Header Files
  • In our program the preprocessor directive #include tells the compiler to add the source file IOSTREAM to the FIRST.CPP source file before compiling.
  • IOSTREAM is an example of a header file (sometimes called an include file). It’s concerned with basic input/output operations, and contains declarations that are needed by the cout identifier and the << operator.
  • Without these declarations, the compiler won’t recognize cout and will think << is being used incorrectly.
  • The newer Standard C++ header files don’t have a file extension, but some older header files have the extension .H.









Comments