Loading video...
Handling Strings
- We’re going to take a closer look at handling character strings.
- There are two kinds of character strings to deal with, the C++ String Object and the Classic C character array.
- C++ String is an object, as in object oriented programming. It tends to be easier to use in everyday programming.
- Classic C String is a null-terminated array of characters, much like any other array.
- C++ String object overloads operators to allow it to be used in expressions similar to other data types.
- It also includes member functions used for other processes, such as searching a string for a sub-string, getting string length, etc.
- We cover some cautions when using Classic C Strings, including cautions using string functions from the standard library.
- Classic C Strings are till required in certain functions.
- Here
are links to more information about string handling:
C++ string object library: http://www.cplusplus.com/reference/string/string/
C string standard library: http://www.cplusplus.com/reference/clibrary/cstring/
Handling Strings
Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.
- Intro
- Overview
- Two Kinds of Strings
- C++ String Object
- String Object Examples
- String Object Member Functions
- More Member Functions
- Arrays of String Objects
- Classic C Character String Array
- Array of Classic C String
- Some Reasons Against Classic
- Cautions with Classic C Strings
- But You Can't be Rid of It
- Don't Tangle Your Strings!

































Start Learning Now
Our free lessons will get you started (Flash® 10 required).
Sign up for Educator.comGet immediate access to our entire library.
Features Overview