> That depends on how your copy constructor is set up.  There are deep
copies and
> shallow copies (they don't do the same thing).  Take a look at a good book
on
> C++ (I recommend Stroustrup's ARM, annotated reference manual).  Look up
"copy
> constructor" in the index for a detailed explanation.
>
> Jeffrey "botman" Broome

    Ah, I didn't know there were different types of copy constructors. I did
a search on the web to find out some more information on shallow and deep
copy constructors. If what I read was correct, the compiler automatically
implements a shallow copy constructor for your classes?
    Also, since the copy constructor is called for a statement like this:

CObject ob1;
CObject ob2 = ob1;

    How would you deal with pointers? I'm not totally sure.

CObject *pob1 = new CObject( );
CObject *pob2 = new CObject( pob1 );

    Yes? No?

- Varlock

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to