Saturday, April 14, 2007

Implicitly defined class members

There are quite a few members that you can get implictly with your class. But only when you show the compiler a need for them. They are :

1. Default (zero-argument) constructor
2. Copy constructor
3. Assignment operator
4. Destructor
5. A pair of 'address-of' operators

Note that, if you define the copy constructor for your class, you don't get the default constructor. See details here : What members of a class are implicitly defined?

Good luck!

Bye!

No comments: