Thursday, June 29, 2023

C++ : Constructors And Destructors

Constructors are used to construct an instance of a class and initiallize the data members of a class.

In C++ initiallization of data members are mandatory.

Destructors are used to deallocate the memory occupied by the instance of a Class.

Please check the example below :

https://github.com/puthukkudi/ConstructorsAndDestructors.git

No comments:

Post a Comment