error code?

My code is as follows:

#include<iostream>
#include<cmath>

using namespace std;

double SalaryCalculator(double sales);

int main()
{ double gross(0), sales;
cout << "Enter the total gross sales for this week:";
cin >> gross;
cout << "Your total earnings for this week are:";
cin >> SalaryCalculator(sales);
}

double SalaryCalculator(double sales)
{
double gross, total(0);
total = 200 + gross * 0.09;
return total;
}

I am getting an error code that states:

salarycalculator.cpp(13): error C2678: binary '>>' : no operator found which takes a left-hand operand of type 'std::istream' (or there is no acceptable conversion)

I am using the correct operator for cin and I am calling my function so what is going on?
cin >> SalaryCalculator(sales);

to

cout << SalaryCalculator(sales);

in line 13
Got it!

Thank you sir!
Topic archived. No new replies allowed.