=====
CS 111 - Week 10 Labs - 2024-11-01
=====
=====
TODAY WE WILL:
=====
* announcements/prep for next class
* demo: another string method: substr
* review clicker questions
* Week 10 Lab Exercise
=====
* should be finishing up Homework 8!
(at-least-first attempts must be submitted by 11:59 pm
tonight, Friday, November 1)
* watch for class emails when HOMEWORK 9 is available!
=====
* added a description of the string class at method to
Week 10 Lecture 2's notes
=====
* here's a quick description of the string class substr method:
* this method is said to be overloaded!
* this means there are two versions with the same name!
* the compiler can tell them apart because one version expects
TWO arguments, and one expects just ONE
* two-argument version: expects the position to start (0-based)
and how many characters to grab, and returns a string
whose contents are the characters from the calling string
starting at that position and grabbing that many
* one-argument version: expects the position to start (0-based),
and returns a string whose contents are the characters from
the calling string starting at that position and grabbing
until the end of the calling string
* you can see a quick demo of these in substr-demo.cpp,
posted with these notes