Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Order of Constructor/ Destructor Call in C++
In this tutorial, we will be discussing a program to understand the order of constructor/ destructor in C++.
Order of constructor/destructor refers to the pattern in which the constructors of various classes are called during inheritance of classes.
Example
#includeusing namespace std; //parent class class Parent{ public: Parent(){ cout Output
Inside base class Inside sub class
Advertisements
