Board index » cppbuilder » Re: About operator=
Bill D. Pirkle
![]() CBuilder Developer |
Re: About operator=2005-10-31 11:13:04 PM cppbuilder74 tinyabs wrote: QuoteMy condition is that this class is not copyable. { // OTHER STUFF private: // HIDE COPY CONSTRUCTOR AND ASSIGNMENT OPERATOR // AND DON'T DEFINE BODIES. WE DON'T PLAN FOR // INSTANCES OF THIS CLASS TO BE COPIED. TMyObject(const TMyObject &); TMyObject & operator=(const TMyObject &); // OTHER STUFF }; I'm no language lawyer, but I tested this long ago and it appeared to be the minimal amount of code that would suffice. -- Bill D. Pirkle www.worldchessnetwork.com - Where the world plays chess! www.tentonhammer.com - EQ2, WoW, GuildWars, Middle-Earth Online, and more! |