CMSC 202 — Fall 2014
Home
Schedule/Lecture Notes
Labs
Projects
Exams
Resources
FAQ
Staff
Syllabus
Lab 8: Operator Overloading
Overview
Basic Structure
Getting the files
The "Complex" Class
Overloading the '+' Operator
Overloading the unary '-' Operator
Overloading the '<<' Insertion Operator
The Lab06.cpp Driver
Compiling and Testing
In this lab you will:
Learn how to overload C++ operators to work on objects of your own class.
Learn the special needs of overloading the "<<" operator to output your own objects
Next »