|
C++ Resources
- Final Exam Review
Slides
Topics
- Special Topics in C++
Other Control Structures Slides
File i/o and Windows Recipe Slides
Sleeping in Windows
Scan Folder or Directory Example
Colorful File Pager
Recovering cin from Typos
- Exam 2 Coding Solutions
Question 4 (the const on the int n parameter is optional);
Question 8 (just the main routine is needed);
Question 9a;
Question 9b & 9c (this is the whole implementation file, just getDollars and addDollars were requested on the exam);
Question 10.
- Pointers and Dynamic Memory
Pointer Slides
Dynamic Memory Slides
Worksheet
Solutions
Dereference NULL
Worksheet code: does your machine print 2 = PI or 2 = E?
- Operator Overloading
Slides
Worksheet
Worksheet Solutions
Overloading by the application author:
point.h
point.cc
path3d-app-operators.cc
Overloading by the class author:
point-class-operators.h
point-class-operators.cc
path3d-class-operators.cc
path data file
- Final Project
Slides
- Exam 2 Review
Review Slides
Topics
- C++ Classes
Slides,
Worksheet,
Solutions,
Wallet Handout,
header file,
source file,
driver file
point Object:
point header file,
point source file,
point driver file,
path3d source,
path data file,
- Stack Explanations: These are slideshows
designed to illuminate
how the program stack, the heap, function call frames, and automatic variables
actually work in C++ (and many other languages). Once you see how
functions call each other (starting with the OS's call to main()) through
the stack, it is easier to grapple with the concepts of function parameters and automatic variable
scope.
You won't be tested on these examples, they are designed to help you better understand
what you will be tested on! If you plan on being a CS major or minor, you could do a lot
worse than understanding these examples thoroughly.
There is a How to Read These Slides section in the first link, you
should start there.
We don't cover recursive functions and the static qualifier for automatic variables, but
if you're a CS major or minor, now is the time to start learning about them!
- More Functions
Slides
Worksheet
Solutions
- Functions
Slides,
Worksheet,
Solutions,
Unix sleep Source
Windoze sleep Source
Example srand() and rand() Source,
Example Stream I/O Source,
main() for testing array functions
- Exam 1 Selected Code Solutions
exam1-10,
exam1-11,
- Exam 1 Review
Review Slides,
Exam 1 Topics
- Arrays
Slides,
Worksheet,
Solutions,
Sample string Source
Sample 1d-Array Source
Sample 2d-Array Source
- Console, Keyboard, and File I/O
Slides
Worksheet
Solutions
block statistics code (source)
I didn't review these generic recipes during lecture, but they are described
in some of my reference slides (past the end of the lecture slides).
generic input_file recipe (source)
generic output file recipe (source)
- Repetitive Statements
Slides
Worksheet
Solutions
- Selection Statements
Slides
Worksheet
Solutions
- Nitty Gritty of C++
Slides
Worksheet
Solutions
- Simple C++
Slides
Worksheet 1
Solutions
- Introduction
Course Handout
Slides
VolumeOfBox.cc
|
|
Announcements
Class-wide Email
Not receiving class E-Mail? Make sure your
official correspondence
E-Mail address is setup correctly in Trailhead. If you change it during the semester, please let me know.
|