Thread: Point-of-Sale
View Single Post
Old Feb 14th, 2007, 6:32 AM   #3
pegasus001
Hobbyist Programmer
 
pegasus001's Avatar
 
Join Date: Nov 2006
Location: 163H
Posts: 215
Rep Power: 3 pegasus001 is on a distinguished road
I don`t like the int type of choice. Wouldn`t it be better being a char.

Quote:
cout << "The current cost of your meal is " << sale << endl;
Then why do you have to output sale when you have not used it at all. Better put it in the end.

Also the function totalsale is useless the way it is. It would be better to put all the switch statement inside the function and then output the sale statement.

Good luck.
__________________
You never test the depth of a river with both feet.
The believer is happy. The doubter is wise.
Free speech carries with it some freedom to listen.
The next generation will always surpass the previous one. It`s one of the never ending cycles of life.
pegasus001 is offline   Reply With Quote