Multiple inheritance
Multiple inheritance
#include <iostream>
#include <stdio.h>
using namespace std;
//Base Class - basicInfo
class basicInfo
{
protected:
char name[30];
int empId;
char gender;
public:
void getBasicInfo(void)
{
cout << "Enter Name: ";
cin.getline(name,30);
cout << "Enter Emp. Id: ";
cin >> empId;
cout << "Enter Gender: ";
cin >> gender;
}
};
cout << "Time to complete work: " << time2complete<< endl; //accessing protected data
}
};
int main()
{
//create object of class employee
employee emp;
emp.getEmployeeInfo();
emp.printEmployeeInfo();
return 0;
}