i keep getting the same errors on my program, any help would be greatly appreciated.
Error 1 error C2784: 'std::basic_istream<_Elem,_Traits> &std::getline(std::basic_istream<_Elem,_Traits> &,std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'std::basic_string<_Elem,_Traits,_Alloc> &' from 'char' c:\Users\esmier\Documents\Visual Studio 2008\Projects\Chapter 4 lab\Chapter 4 lab\source.cpp 40 Chapter 4 lab
Error 2 error C2780: 'std::basic_istream<_Elem,_Traits> &std::getline(std::basic_istream<_Elem,_Traits> &,std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem)' : expects 3 arguments - 2 provided c:\Users\esmier\Documents\Visual Studio 2008\Projects\Chapter 4 lab\Chapter 4 lab\source.cpp 40 Chapter 4 lab
there errors also happen in the section commented as case b
#include <iostream>
#include<sstream>
int main()
{
double hours;
double Package_A_price=9.95, Package_A_hours=10, Package_A_additional=2.00,Package_A_total;
double Package_B_price=14.95, Package_B_hours=20, Package_B_additional=1.00,Package_B_total;
double Package_C_price=19.95;
char package_choice, additional_hours[3];
//table output
cout<<"Please choose your package below";
cout<<"Package A:\t"<<"For $9.95 per month 10 hours of service are provided.\n";
cout<<"\t\tAdditional hours are $2.00 per hour\n\n";
cout<<"Package B:\t"<<"For $14.95 per month 20 hours of service are provided.\n";
cout<<"\t\tAdditional hours are $1.00 per hour\n\n";
cout<<"Package A:\t"<<"For $19.95 per month unlimited access is provided.\n\n\n";
cout<<"What is your package letter?\n";
cin>>package_choice;
while (package_choice!='A'||'a'||'B'||'b'||'C'||'c')
{
cout<<"You entered an incorrect option.\n";
cout<<"please reenter your choice.\n\n";
}
switch (package_choice)
{
//package A choice
case 'A||a':
cout<<"Did you have any additional hours?\n";
getline(cin, additional_hours);
if (additional_hours == 'yes')
{
cout<<"How many hours did you have?\n";
cin>>hours;
while (hours >744)
{
cout<<"You can not have over 744 hours per month!\n";
cout<<"Time is a linear constant, Please renter your amount.\n";
}
Package_A_total=9.95+(2.00*hours);
cout<<"Your Total for Package A is $"<<Package_A_total;
break;
}
//package B choice
case 'B||b':
cout<<"Did you have any additional hours?\n";
getline(cin, additional_hours);
if (additional_hours == 'yes')
{
cout<<"How many hours did you have?\n";
cin>>hours;
while (hours >744)
{
cout<<"You can not have over 744 hours per month!\n";
cout<<"Time is a linear constant, Please renter your amount.\n";
}
Package_B_total=14.95+(1.00*hours);
cout<<"Your Total for Package B is $"<<Package_B_total;
break;
}
//package C choice
case 'C||c':
cout<<"Your Total for Package C is $"<<Package_B_price;
break;
default: cout<<"You did not Enter A B or C.\n";
cout<<"Please reenter your choice.";
}
system ("pause");
return 0;
}