|
|
The standard libraries supplied by the C and C++ compilation system contain functions that you can use in your program to perform input/output, string handling, and other high-level operations that are not explicitly provided by the C language. Header files contain definitions and declarations that your program will need if it calls a library function. The functions that perform standard I/O, for example, use the definitions and declarations in the header file stdio.h. Using the line:
#include <stdio.h>in your program, assures that the interface between your program and the standard I/O library agrees with the interface that was used to build the library.
``C and C++ compilation system'' describes some of the more important standard libraries and lists the header files that you need to include in your program if you call a function in those libraries. It also shows you how to use library functions in your program and how to include a header file. You can, of course, create your own libraries and header files, following the examples of modular programming described in ``C and C++ compilation system''.
C standard library header files have the file extension .h and can be used by both C and C++ programs. C++ standard library header files have no file extension and can be used only by C++ programs.