Help with register program

Hello, I'm currently working on creating a register for the business I work for. Our registers crashed and I wanted to start a little project just for fun and possibly a backup register just in case. My issue is getting my total to be ALL of the users purchases. It's currently just placing the last order from the register into total. So no matter how many times it loops around taking a new order the total is always equal to the last item. Here's a snip-it of my code, I can post the whole program if needed, but it's nearly 500 lines and I didn't want to take up too much space. Any help will be greatly appreciated, thanks!


cout << "Would you like to order another item? (y/n): ";
cin >> AnotherItem;

if (AnotherItem == "y")
{
goto start;
}

else if (AnotherItem == "n")
{
goto CalculateBill;
}


CalculateBill:

double Total = Price + Extra;

cout << endl << "Your total is: $" << Total << "." << endl;
cout << endl << "Please enter cash received from customer: $";
cin >> Cash;

double Change = Cash - (Price + Extra);

cout << endl << "Thank you! Your change is: $" << Change << "."


Topic archived. No new replies allowed.