Appendix C: A Selection of Standard Library Routines
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
Get C++ Plus Data Structures, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.