Dấu 2 chấm trong dòng NhanVienSanXuat() : NhanVien() có ý nghĩa gì vậy ạ.cảm ơn.
class NhanVienSanXuat : public NhanVien
{
private:
int soSanPham;
float tienCong1SP;
public:
NhanVienSanXuat() : NhanVien()
{
this->soSanPham = 0;
this->tienCong1SP = 0;
}
void nhap()
{
NhanVien::nhap();
cout << "So san pham: ";
cin >> this->soSanPham;
cout << "Tien cong 1 san pham: ";
cin >> this->tienCong1SP;
}
void xuat()
{
cout << "So san pham: ";
cout << this->soSanPham << endl;
cout << "Tien cong 1 san pham: ";
cout << this->tienCong1SP << endl;
cout << "Luong: ";
cout << this->luong << endl;
}
void tinhLuong()
{
this->luong = this->soSanPham * this->tienCong1SP;
}
};