Header Ads Widget

Ticker

6/recent/ticker-posts

Multiple Inheritance Programing In C++-Language - Digitalise Data

 

"Multiple Inheritance", "Digitalise Data"

This Program Is An Example Of Multiple Inheritance In C++

"Digitalise Data" "Multiple Inheritance"
This Is The Diagram Of Multiple Inheritance Programing In C++

Simply Copy And Paste This Code

Code:-
#include <iostream.h>
#include <conio.h>
class A {
public:
  A(){
     cout<<"Constructor of A class"<<endl;
  }
};
class B {
public:
  B(){
     cout<<"Constructor of B class"<<endl;
  }
};
class C: public A, public B {
public:
  C(){
     cout<<"Constructor of C class"<<endl;
  }
};
void main() {
   //Creating object of class C
   C obj;
   getch();
}

OutPut
/*Output:
Constructor of A class
Constructor of B class
Constructor of C class*/

Run This Program Using Turbo C++ in Pc Or TurboCdroid in Android It Will Work

#DigitaliseData
#C++Programing

Post a Comment

0 Comments