Lecture overview -- Keyboard shortcut: 'u'  Previous page: C++ style strings -- Keyboard shortcut: 'p'  Next page: References -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 2 - Page 14 : 42
Notes about C++
Basic facilities
Strings - examples

We show simple examples that illustrate the value semantics of C++ strings

  • The C++ Programming Language: Page 588
 

y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/strings/knold-tot.ccThe Knold & Tot example from section 20.3.6 of The C++ Programming Language.


y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/strings/knold-tot-c-like-1.ccThe Knold & Tot example with char*.


y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/strings/knold-tot-c-like-2.ccThe Knold & Tot example with char[].


y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/strings/knold-tot-c-like-3.ccThe Knold & Tot example with strcpy from <cstring>.


 

y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/strings/string-ex.ccIllustration of various basic string operations in C++.


y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/strings/string-ex-outputProgram output.


Go to exerciseString functions