this is the code. user inputs wind speed and temperature and then the function should calculate the wind chill.. i get these errors. can't figure out what to do about them.
homeworkchp3prb7.cpp: In function ‘int main()’:
homeworkchp3prb7.cpp:26: error: expected primary-expression before ‘double’
homeworkchp3prb7.cpp:26: error: expected primary-expression before ‘double’
homeworkchp3prb7.cpp: In function ‘double theWindChill(double, double)’:
homeworkchp3prb7.cpp:44: error: ‘(((sqrt(windSpeed) * 1.0e+1) - windSpeed) + 1.05e+1)’ cannot be used as a function
When calling a function, you don't specify the type of the parameter. You only do that when defining the function. But when calling it, you just give it the parameters you want.
Here, you probably wanted to give it your local variables 'WindSpeed' and 'TempC' (note: the capitalized versions as defined in main).
I don't know what you're trying to do there, but it looks like you're missing an operator. If you were trying to multiply those 2 values together, you need to use the * operator. Back-to-back parenthesis does not mean multiplication in C++ like it does in algebra.