Just a quick question. Do copy constructors get inherited in derived classes?
Will WoolyMammoth have the same copy constructor as Animal, or would I need to define a new one?Code:class Animal { public: Animal(const Animal& orig) :age(orig.age) {} protected: int age; }; class WoolyMammoth : public Animal { public: int blah(); };
**EDIT**
Actually, in this case is there even any need for a copy constructor, since the only data that's stored in the struct is an int?
P.S. Someone's gotta fix these edit boxes... every time i hit 'edit', I lose all the indentation in my posted code. Very annoying.