View Single Post
Old Jul 13th, 2007, 12:58 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Don't mix new with free. Free is for use with malloc. Delete is for use with new.

I would use C++ file I/O and write a serialize method for the class (overload the << operator, for instance).
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote