I've been trying to fix this error for a while now, I could really use some help.
C:\Users\Clayton\Documents\CH4P11.CPP(71) : error C2676: binary '>>' : 'class std::basic_ostream<char,struct std::char_traits<char> >' does not define this operator or a conversion to a type acceptable to the predefined operator
code:
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double baseSalary;
double noOfServiceYears;
double bonus;
double totalSale;
double additionalBonus;
double payCheck;
cout<<fixed<<showpoint;
cout<<setprecision(2);
cout<<"To calculate the salesperson's paycheck, please enter all data"
<<" as accurately as possible."<<endl;
cout<<"Please enter the base salary."<<endl;
cin>>baseSalary;
cout<<"Please enter the number of years that the salesperson has been"
<<" with the company."<<endl;
cin>>noOfServiceYears;
if(noOfServiceYears <= 5)
bonus = 10 * noOfServiceYears;
else
bonus = 20 * noOfServiceYears;
cout<<"Finally, please enter the total sale made by the salesperson"
<<" for the month."<<endl;
cin>>totalSale;
if(totalSale < 5000)
additionalBonus = 0;
else
if(totalSale >= 5000 && totalSale < 10000)
additionalBonus = totalSale * (0.03);
else
additionalBonus = totalSale * (0.06);
payCheck = baseSalary + bonus + additionalBonus;
cout<<"The paycheck for the salesperson will be approximately ">>payCheck>>" "
<<" . Thank you for using this program."<<endl;
return 0;
}