|
|
|
| Precedence (continued) | | Operator | Associativity | | || | Left to right | | ?: | Right to left | | = += -= etc. | Right to left | | , (the operator, not the separator) | Left to right |
|
|
|
|
|
|
This book does not discuss the comma operator listed at the bottom of the chart or the ->* and .* operators (pointer-to-member selection operators). For a description, see Stroustrup's The C++ Programming Language (Addison-Wesley, 1991). |
|
|
|
|
|
|
|
|
Appendix C C++ Library Routines |
|
|
|
|
|
|
|
|
The C++ standard library provides a wealth of functions, named constants, and specialized data types. This appendix details only some of the most widely used library routines (and several named constants). It is a good idea to consult the manual for your particular system to see what other routines the standard library provides. |
|
|
|
|
|
|
|
|
This appendix is organized according to the header files 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 math.h as follows: |
|
|
|
|
|
|
|
|
#include <math.h>
.
.
.
y = sqrt(x); |
|
|
|
|
|  |
|
|
|
|
Parameter: |
|
|
|
|  |
|
|
|
|
An int expression booleanExpr, usually written as a logical (Boolean) expression |
|
|
|
|  |
|
|
|
|
Effect: |
|
|
|
|  |
|
|
|
|
If booleanExpr is nonzero (TRUE), execution of the program simply continues. If booleanExpr equals 0 (FALSE), execution terminates immediately with a message stating the Boolean expression, the name of the file containing the source code, and the line number in the source code. |
|
|
|
|
|
|
|