|
|
|
|
|
|
|
|
Effect:
Function return value:
Note: |
|
|
|
|  |
|
|
|
|
fromStr, including the null character \0, is concatenated (joined) to the end of toStr. |
|
|
|
|
|
|
|
|
The base address of toStr |
|
|
|
 |
|
|
|
|
Programmers usually ignore the function return value, using the syntax of a void function call rather than a value-returning function call. |
|
|
|
| |  |
|
|
|
|
Parameters:
Function return value: |
|
|
|
|  |
|
|
|
|
Strings (null-terminated char arrays) str1 and str2 |
|
|
|
|
|
|
|
|
An int value < 0, if str1 < str2 lexicographically
The int value 0, if str1 = str2 lexicographically
An int value > 0, if str1 > str2 lexicographically |
|
|
|
| |  |
|
|
|
|
Parameters:
Effect:
Function return value:
Note: |
|
|
|
|  |
|
|
|
|
toStr is a char array and fromStr is a string (null-terminated char array), and toStr must be large enough to hold the result. fromStr, including the null character \0, is copied to toStr, overwriting what was there. |
|
|
|
|
|
|
|
|
The base address of toStr |
|
|
|
 |
|
|
|
|
Programmers usually ignore the function return value, using the syntax of a void function call rather than a value-returning function call. |
|
|
|
| |  |
|
|
|
|
Parameters:
Function return value: |
|
|
|
| |
|
|
|
|
A string (null-terminated char array) str |
|
|
|
 |
|
|
|
|
An int value > 0 that is the length of str (excluding the \0) |
|
|
|
|
|
|
|
|
|
|
Appendix D Syntax Templates |
|
|
|
|
|
|
|
|
The syntax templates in this appendix describe most, but not all, of the C++ language. To save space, some language features that are not discussed in this book have been omitted. |
|
|
|
|
|
|
|
|
Each syntax template is labeled with a name. Within a syntax template, boldface words and symbols are literal symbols in the C++ language, and each nonboldface word can be replaced by another syntax template. Items that are shaded are optional. Three dots () mean that the preceding symbol or shaded block can be repeated. A (nonboldface) brace indicates a list of items from which any one can be chosen. |
|
|
|
|
|