Strings.
Strings in C++ are represented as:
- arrays of type char
- pointers of type char
Arrays of type char.
char astring[10]
This declares a string of length 9. Note that all strings must be terminated by the symbol '/0'.
Example: H e l l o /0
Previous slide
Next slide
Back to first slide
View graphic version