Part of my program I am working on keeps telling me that I am using an illegal operand. Yes it is part of my homework, but no I am not asking you to do it for me. I don't understand why it says that the double is an illegal operand.
class employee
{
public:
string name;
int hours;
double rate;
double otRate()
{
return rate*0.5;
}
double total1()
{
return hours*rate;
}
double otPay()
{
return (&employee::otRate)*(hours-40);//this is the error line.
}
};
The line should calculate the amount of money that a worker is going to earn just for the overtime he or she works. I have it working now. Thank you very much for pointing me in the right direction.