#include<iostream>
using namespace std;
class A
{
public:
void showdata()
{
cout<<"\nBase Class A";
}
};
class B:public A
{
public:
void showdata1()
{
cout<<"\nDrived Class B";
}
};
int main()
{
B obj;
obj.showdata();
obj.showdata1();
return 0;
}
using namespace std;
class A
{
public:
void showdata()
{
cout<<"\nBase Class A";
}
};
class B:public A
{
public:
void showdata1()
{
cout<<"\nDrived Class B";
}
};
int main()
{
B obj;
obj.showdata();
obj.showdata1();
return 0;
}
No comments:
Post a Comment