#include "WagedEmployee.h"
#include<string>
WagedEmployee::WagedEmployee()
{
//Employee::Employee();
}
WagedEmployee::WagedEmployee(char *name2, double w,double h)
{
::Employee(name2);/
wage=w;
hours=h;
}
void WagedEmployee::nhap()
{
/*cout<<"Nhap ho vs ten: ";
fflush(stdin);
cin.getline(,50);*/
Employee::nhap();
cout<<"Nhap tien luong: ";
cin>>wage;
cout<<"Nhap gio: ";
cin>>hours;
}
void WagedEmployee::xuat()
{
//cout << "Ho Ten: " << aname << endl;
Employee::xuat();
cout<<"Luong Co Ban tinh theo gio: "<<wage<<endl;
cout<<"So gio lam viec: "<<hours<<endl;
cout<<"Luong: "<<wage*hours<<endl;
}
/*istream& operator>>(istream &is,WagedEmployee &x)
{
int
return is;
}
ostream& operator<<(ostream &os,WagedEmployee x)
{
return os;
}*/
nó báo sai ở chổ name2
Error 1 error C2082: redefinition of formal parameter ‘name2’