Unit 07: Strings

  1. Introduction

  2. Example code and additional resources

This week's stuff:



The string data type in C++ is more sophisticated than the basic data types like integers, floats, and booleans. Technically, a string is a class that's created in the C++ standard library, so it has functions available to help with string manipulation. We'll explore some of this functionality here.

A really handy reference page is the cplusplus.com string docs that give you a rundown of the string class and its functions. When you click on a function name link it will give you more details and example code for using that function.

We'll step through the functionality together in class, going through the textbook chapter on strings: https://moosadee.gitlab.io/courses/202401_Spring/book_corecpp.html

We'll also do the strings lab together, so make sure to attend class or watch the class archive afterwards.

Example code and additional resources

Example code: (repository)


Archived videos: