CS 106 Intro to CS 1 Wednesday, 10/23/02. QUESTIONS?? Today: Discussion of HW #3 The const modifier for functions and parameters The char object type Some new numeric operators Reading: pp. 135-142 of Chapter 6 Exercises: p. 150 #9, 10, 19.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Complex Complex::AddC (Complex x) const //uses a copy of x
Complex Complex::AddC (Complex& x) const //uses x, can change x
Complex Complex::AddC (const Complex& x) const //uses x, can’t // change x
char c1 = 'a', c2 = 'B';
cout << c1 << c2 << endl;
cout << toupper(c1) << tolower(c2) << endl;
char c3 = toupper(c1);
cout << c3 << char(tolower(c2)) << endl;
5 % 2 evaluates to 1
12 % 4 evaluates to 0
4 % 5 evaluates to 4