Lecture overview -- Keyboard shortcut: 'u'  Previous page: C++ style strings -- Keyboard shortcut: 'p'  Next page: References -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Alphabetic index  Help page about these notes  Course home    Basic facilities, Part 1 - slide 18 : 28

Strings - examples
We show simple examples that illustrate the value semantics of C++ strings
knold-tot.cc
The Knold & Tot example from section 20.3.6 of The C++ Prog.
knold-tot-c-like-1.cc
The Knold & Tot example with char*.
knold-tot-c-like-2.cc
The Knold & Tot example with char[].
knold-tot-c-like-3.cc
The Knold & Tot example with strcpy from <cstring>.
string-ex.cc
Illustration of various basic string operations in C++.
string-ex-output
Program output.
Go to exercise
String functions