Previous Section
 < Free Open Study > 
Next Section


Appendix C: A Selection of Standard Library Routines

Overview

The C++ standard library provides a wealth of data types, functions, and named constants. This appendix details only some of the more widely used library facilities. It is a good idea to consult the manual for your particular system to see what other types, functions, and constants the standard library provides.

This appendix is organized alphabetically according to the header file your program must #include before accessing the listed items. For example, to use a mathematics routine such as sqrt, you would #include the header file cmath as follows:

    #include <cmath>
    using namespace std;
     
    y = sqrt(x);

Note that every identifier in the standard library is defined to be in the namespace std. Without the using directive above, you would write

   y = std::sqrt(x);


Previous Section
 < Free Open Study > 
Next Section
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)