Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is mean by constructor and destructor in c++?

constructor destructor mean
0
Posted

What is mean by constructor and destructor in c++?

0

A constructor is a function that initilizes the members of an object. When an object of a class is created, C++ calls the constructor for that class. If no constructor is defined, C++ invokes a default constructor, which allocates memory for the object, but doesn’t initialize it.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.