C++ Polymorphism

Polymorphism means having many forms. The word “poly” means many and “morphs” means forms, which means it is the way of performing some task in many ways. That means a single function or an operator functioning in many ways. It …

Read moreC++ Polymorphism

C++ Destructor

As the name indicates, a C++ destructor destroys the object of a class as soon as the scope of an object ends. It is opposite to a constructor. When an object goes out of the scope, the compiler automatically calls …

Read moreC++ Destructor

C++ Constructor

In C++, a constructor is a special type of method that is called automatically when an instance of the class (object) is created. The compiler calls the constructor and is used to initialize the data members of a newly created …

Read moreC++ Constructor