C++ Programming Code Examples C++ > Beginners Lab Assignments Code Examples Order of Constructor Call Order of Constructor Call When a default or parameterized constructor of a derived class is called, the default constructor of a base class is called automatically. As you create an object of a derived class, first the default constructor of a base class is called after that constructor of a derived class is called. To call parameterized constructor of a base class you need to call it explicitly as shown below. Student(string szName, int iYear, string szUniversity) :Person(szName, iYear) { } //base class class Person { public: Person() { cout << "Default constructor of base class called" << endl; } Person(string lName, int year) { cout << "Parameterized constructor of base class called" << endl; lastName = lName; yearOfBirth = year; } string lastName; int yearOfBirth; }; //derived class class Student :public Person { public: Student() { cout << "Default constructor of Derived class called" << endl; } Student(string lName, int year, string univer) { cout << "Parameterized constructor of Derived class called" << endl; university = univer; } string university; };