Appendix E Common Library Functions

The C++ library is too large to be covered in a few pages. However, the most commonly used library functions fall into just a few categories: string functions, data-conversion functions, single-character functions, math functions, and (because they are used in this book) the randomization functions. This appendix provides a quick overview.

String Functions

To use these functions, include the file string.h. The functions apply to traditional C char* strings, but not to the new, automated C++ string class. The latter is described near the end of Chapter 7.

In the following Table E1, s, s1, and s2 are null-terminated char* strings (actually, each of these arguments contain the address of the string); n is an ...

Get C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart 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.