I started a program that calculates an employee's weekly gross pay when the user inputs hours worked and hourly pay rate. With what I have so far, it compiles fine, but gives these errors:
on Dev-C++:
message: [Linker error] undefined reference to 'get_pay(float, float)'
Id returned 1 exit status
file: C:\Dev-Cpp\Programs\Makefile.win message: [Build Error][grossPay.exe] Error 1
on Visual Studio 2005:
1>------ Build started: Project: grossPay, Configuration: Debug Win32 ------
1>Linking...
1>grossPay.obj : error LNK2019: unresolved external symbol "void __cdecl get_pay(float,float)"
How do I resolve this linker error? And also, how would I add if/else statements for the following condition? If the employee's weekly gross pay is more than $200 (personal exemption), then the employee pays 12% federal tax and 5% state tax from his taxable income (gross pay - exemption). I'd also like to combine the functions I have so that taxable income, fed tax, and state tax are all calculated in the same function.
I think your meant to pass the values to the function, if you create them inside the function you shouldn't add the wage and hours to the arguement list.
For your tax thing I'd say have a function called tax: