DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Introduction to programming in standard C and C++

Libraries and header files

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.


Next topic: How C and C++ programs communicate with the shell
Previous topic: C++ language

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005