I've used this board to my benefit for a few weeks now, so I thought I'd better register and say "Thanks".... "Thanks!"
Here is a problem I'm currently kicking around (yes, it is for a C++ class, no it is not due tomorrow), any ideas are appreciated.
I have a simple program that creates "rectangles" (a class with "width" and "length" data members). I have to create multiple rectangles, change lengths or widths on some, check to see if any of them are squares... no sweat so far. The catch is:
*we have to send our output to a file--AND the output has to include a notice of each object going out of scope (when the program ends)*
SO, how do I go about getting two or more destructors from different objects writing to the same output file?
I am working on getting a static ofstream object in the public data members of my rectangle class-- with some trouble. I'm not sure that can be done yet...