1) Please use code tags when posting code, to make it readable:
http://www.cplusplus.com/articles/z13hAqkS/
2) What is this supposed to be?
char choice = 'M';'C';'P';'T';
Do you understand that all this does is initialise
choice to
'M', and that nothing after the first semicolon does anything at all?
3) In your
while (true) loop in
main(), every single path has a
break statement, so the loop can only ever iterate once. Is this what you intended?
4) Nowhere in your code do you ever call the function
calPrice() .
5) In your
addItem() function, you declare local variables
calPrice and
quantity. You never assign any values to those variables, so when you attempt to use them, they contain unknown values.
6) Your
addItem() function is defined as returning an int. However, the value you're returning is a double. Is that deliberate? I'm guessing not.