does this mean I have to equip my class with a default constructor, a copy constructor, and an assignment operator, even though it does not have (or need) any of this at the present?
You can avoid this by creating a list of pointers.
Originally Posted by Havard
it says: "If we don't provide a copy constructor or an assignment operator, C++ provides a default implementation that performs a member-by-member copy. "
How come?
That's how C++ works. You can disable this by delaring those methods as private.
Bookmarks