It is a special member function, since it's name is
same as class name.
To
initialize the objects in memory.
It is
invoked automatically when an object is created.
They
don't have return type.
They
can be overloaded.
They
can not be overridden.
All the
classes have a default constructor(no argument constructor) implicitly.
After
we defined a parameterized constructor, default constructor will be destroyed.
After that, if we want to create an object by invoking default constructor,
then default constructor to be defined explicitly by ourself as needed.
No comments:
Post a Comment