Class name and constructor names are same. Destructor gets a ~ symbol before the name.
When the object creates the contructor invoked .
when the object delets the destructor invoked.
Mostly contructor used to allocate the memory and initiate the members.
Destructor used to deallocate the memory....
Leave a comment: