owch... you did mean you, "put those recommendations in" line by line, word for word.
Well most of your errores can by fixed by adding the word "void" to the begining of your definition lines:
void CoffeeOrder::displayValues()void CoffeeOrder::takeOrder()The definition of your function must look like the declaration.
Once that is done you still get some errors because you copied my code and pasted it into your code without thinking.
CODE
cin >> cInput
if (cInput == 'y' || cInput == 'Y') { cream = 1; }
this was an
example of how to get an input that allows the user to press 'y' or 'Y' rather than '1' or '0'... You can't use it exactly as written in each case.
Because you did not think when you pasted this into your code you made the construction:
CODE
if (cInput == 'y' || cInput == 'Y') { cream = 1; }
{
cout<<"Would You Like Milk In Your Coffee? ";
cin>>milk;
} else
{
cout<<"Would You Like Sugar In Your Coffee? ";
cin>>sugar;
}
Here the 'else' causes an error because it is not paired with the 'if' above it. The if statement has
{ cream = 1; } and that is what it executes... the next lines are not part of the if statement. Thus seperating the 'if' from the 'else'. Even if they DID work that way... your logic there would make NO sence.
When you program you have to run the program in your head line by line. THINK about what each line does.