Thread
:
Stadard C i/o problems with C++ classes
View Single Post
Jul 13th, 2007, 12:58 PM
#
2
DaWei
Resident Grouch
Join Date: Jun 2005
Posts: 6,453
Rep Power:
10
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
View Public Profile
Visit DaWei's homepage!
Find More Posts by DaWei