Dr. Taylor's C++ Examples
Here are a number of examples that you may wish to study. Please
let me know if you have any questions or comments about them. I am
particularly interested in learning about any mistakes that I may have
made.
Simple examples (CS-182)
String streams
- enterInt checks user input for an integer
and retries if not
Class (abstract data type) related examples (CS-183)
Simple Class
- A simple Date class (including static data members)
UML
- UML -- An example of a UML diagram to
describe three classes and their relationships to each other
Dynamic Memory Allocation
- String -- A simplified version of the C++ ANSI
standard string class
Inheritance
- Folder -- A collection of three classes:
TextDoc, Folder, and SuperFolder that
illustrates class inheritance
Polymorphism
MFC related examples (CS-182 - CS-285)
Button Coloring
- Button Coloring -- An example of how to
change the color of a button control
Standard Template Library related examples (CS-182 - CS-321)
Other examples
Random Access Streams
- Random Access -- An example of how to
random access functionality with file streams
.wav Files