一句代码没有看懂,求一下解释
class Worker:public Employee{public:
Worker(int gl);
void sethour(float hr)
{
hour=hr;
}
void setgongzi(float gz)
{
gongzi=gz;
}
float computerpay();
private:
float hour,gongzi;
};
Worker::Worker(int gl):Employee(gl)//这里没看懂,是说Worker 继承了雇员类并且初始化新加入的hour和gongzi吗
{
hour=0;
gongzi=0;
}