/* * intcell_tester.cpp * */ #include #include "intcell_bigthree.h" using namespace std; int main() { IntCell a(4); IntCell b = a; // calls the copy constructor IntCell c; // calls the assignment (=) operator // Note: this assignment creates a // memory leak if we are using the // intcell_default.h version of the IntCell class. // Think about why this is the case c = b; a.setValue(100); cout << "a: " << a.getValue() << endl; cout << "b: " << b.getValue() << endl; cout << "c: " << c.getValue() << endl; return 0; }