RE: [Dev-C++] Copy Constructors and Overloaded Assignment Operators
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2002-07-21 10:12:32
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Matthew Hickson > Sent: Sunday, July 21, 2002 2:43 AM > To: 'Dev-C++ Mailing List' > Subject: Re: [Dev-C++] Copy Constructors and Overloaded > Assignment Operators > > Another rule > to tag on > to using static members for > callbacks. What do you mean with that? > Now, speaking of class members, how would you persist state? > > In VB (the realm I come from... well, there was Pascal those many > years ago 8-), I would use a Type (read struct) to hold my data. > This allows for quick memory copies to restore defaults/back out > changes... In C++ I can also see it making serialization a little > easier (convert to a char array/string and dump to disk). > > Any thoughts on alternative measures to accomplish the same? > > (I'm playing with a few projects that might make use of something > like this, but want to make sure that I'm not starting off on the > wrong foot...) Well i guess you can use a reset() member function with no values stored in disk. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |