There is a portion of my program that says "Please enter [A] or [B]" then uses cin to get input. I want to make it so that "A" or "B" gets removed off the console line after the user presses enter so they don't have to look at it.
Here is the code:
double water(char chrSelection, int numQuant)
{
system("CLS");
cout << "%%%%%%%%%" << endl;
cout << "% Water %" << endl;
cout << "%%%%%%%%%" << endl << endl;
cout << endl << "A.) 12pk;";
cout << endl << "B.) 24pk;" << endl;
cout << "Please enter [A] or [B]" << endl;
cin >> chrSelection;
//cout << '\b' << endl;
chrSelection = toupper(chrSelection);
cout << "Quantity: ";
cin >> numQuant;
if (chrSelection == 'A')
{
return numQuant * 1.49;
}
else if (chrSelection == 'B')
{
return numQuant * 2.49;
}
}