This exercise is about understanding some existing code - you don't write
any new code.
The file /cse/courses/cse333/13au/ex10.tar.gz
(on department
machines like attu
) contains a slightly more annotated
version of the code we started looking at in class today.
That code prints messages when constructors, destructors, or assign operators
are invoked (as well as at other times).
You should run the code and make sure you can understand why
each line of its output appears
(and possibly why no other lines that you might have expected do not appear).
Having done that, hand in a file that contains all and only those lines of output that are caused by executing this line in main.cc
returnedVal = sub(local_clone);
Operational Notes:
Example.h
- there are
four steps to work through. When you're done, you'll have commented out two
lines of the mainline (plus you'll know a lot about the default constructor).
Until you get to that point, the code won't (or at least probably won't) run.
makefile
. You can say make run
to
build and run. You don't have to use the makefile
, however.