I've posted my code before but i'm still having problems. Well first the program does not read from the Store.txt file that holds the name and price of each item. What I just want is for the program to read the prices and calculate the right total price and then print it out in the receipt. Any ideas anyone?
Oh and also I would like to thank chervil for helping me in last post!
When I copy youvr program and store.txt, it displays the menu fine. Make sure that you're storing the menu in the same directory as where the program runs. If necessary, give a fill path to store.
You aren't using the global Read variable. Remove it (line 9) and everywhere it's used (lines 69, 91 & 92)
Line 93: You should read the item as a number, not a string. So change Item to an int or (better yet) an unsigned. You don't want a string because...
Line 99: You need to compute the price of the item by looking it up in the menu vector. Since you're now reading Item as an integer, menu[Item] contains the info for the item that they ordered. Use that to get the price.
Make those changes and it that much working.
Once you have this working, consider the receipt. Right now it just gives the total + tip. Shouldn't it be itemized, showing the name, price, quantity and subtotal for each item?