Are array members copied "by content" by the default copy constructors? Or will I be modifying both "copies" if I modify one of the members like what would happen were they pointers to dynamically allocated memory?

Thanks

02-17-2008

vart

pointers are copied
memory they point - not
so you get two instances pointing same dynamic memory

It is a reason to use vectors

02-17-2008

cyberfish

Quote:

pointers are copied
memory they point - not
so you get two instances pointing same dynamic memory

It is a reason to use vectors

Thanks for your reply. I know what would happen if I use dynamic memory. What about arrays allocated on the stack?