this is just a small portion of a program i'm working on, but i'm not really sure what im doing wrong with the declaration and use of these functions.. I "understand" what its telling me, but not sure how to fix the errors at the bottom of the page. any suggestions?? thanks..
Code:
float CalcGross(float hrsWkd, float payrate);
float CalcFICA(float ytd, float gross);
float CalcGross(float hrsWkd, float payRt)
{
float gross = (hrsWkd * payRt);
return gross;
}
float CalcFICA(float ytd, float gross)
{
if(ytd >= 67000.00)
ficaTax = 0.00;
else if ((ytd + gross) <= 67000.00)
ficaTax = (gross * ficaRate);
else ficaTax = (67000.00 - ytd) * ficaRate;
return ficaTax;
}
lab2.c: In function âmainâ:
lab2.c:70: error: static declaration of âCalcGrossâ follows non-static declaration
lab2.c:16: error: previous declaration of âCalcGrossâ was here
lab2.c:76: error: static declaration of âCalcFICAâ follows non-static declaration
lab2.c:17: error: previous declaration of âCalcFICAâ was here