/*C++ program to demonstrate example of simple inheritance.*/
using namespace std;
// function definiion
cout << "I'm the body of Afun()..." << endl;
class B:public A
// function definition
cout << "I'm the body of Bfun()..." << endl;
//create object of derived class - class B
// Now, we can access the function of class A (Base class)
I'm the body of Afun()...
I'm the body of Bfun()...
total answers (1)
start bookmarking useful questions and collections and save it into your
own study-lists, login now to start creating your own collections.