Next: Structures
Up: Data Structures
back: Arrays
-
A character string is an array of characters terminated by the ASCII
0 or NULL character
-
You create a character string within your programs by declaring an
array
of type char
-
Your program is responsible for appending a NULL character after the
string's last character
-
When your program use string constants contained within double quotes,
the C++ compiler automatically appends the NULL character
-
C++ lets you initialize strings at declaration by specifying the
desired
characters within double quotes
-
Most C++ compilers provide an extensive set of string
manipulation functions in their run-time library