I cannot explain why I am getting this logic error! Take a look:
This is in the header -
class PayRoller
{
public:
void initialize();
double getNum();
void setNum(double);
double getGrossPay();
void setGrossPay(double);
double getWage();
void setWage(double);
double getAddTotal();
void setAddTotal(double);
}
And here is the first function that is called after the object is made-
void PayRoller::initialize();
{
setGrossPay(0.0);
setWage(0.0);
setAddTotal(0.0);
cout << (getGrossPay() + getAddTotal());
start();
}
And finally here are the getters and setters-
void PayRoller::setGrossPay(double temp)
{
grossPay = temp;
}
double PayRoller::getWage()
{
return wage;
}
void PayRoller::setWage(double temp)
{
wage = temp;
}
double PayRoller::getAddTotal()
{
return addTotal;
}
void PayRoller::setAddTotal(double temp)
{
wage = temp;
}
When I start the code (without debugging) the value I get from the cout in initialize() is -9.25596e+061
What am I doing wrong here? I can't seem to figure it out. Thanks in advance!