The code below takes the quantity of tickets from the 55 tickets that is available and it stores the value in a text file. What I want the program to do is to store the amount of tickets that is available and then each time the program executes it will take away from the remaining tickets that is available. Thanks
AmountOfTickets = 55;
NewAmountOfTickets = AmountOfTickets - AdditonalAdultQty - AdditonalChildQty - AdditonalSeniorQty - AdditonalFamilyQty - AdultQty - ChildQty - SeniorQty - FamilyQty;
ofstream myfile1;
myfile1.open ("Tickets Left.txt");
myfile1 << NewAmountOfTickets;
myfile1.close();
NewAmountOfTickets1 = NewAmountOfTickets - AmountOfTickets - AdditonalAdultQty - AdditonalChildQty - AdditonalSeniorQty - AdditonalFamilyQty - AdultQty - ChildQty - SeniorQty - FamilyQty;
ifstream inFile("Tickets Left.txt");
inFile>> NewAmountOfTickets;
inFile.close();