I'm doing this for a c++ class I have, and I'm stuck as to where to go next. This is super easy stuff I'm assuming, i'm just stuck.
The program is: I have to read this data:
Box | 250 5750
Sideline | 100 28000
Premium | 50 35750
General | 25 18750
This is data from seats sold to a game. the first number after the seat type is the price of the ticket, the second is the number sold. I am only telling you this so my code so far will make sense to you.
using namespace std;
outFile<<fixed << showpoint;
//gathering data from tickets.txt
getline(inFile, seatType, '|');
inFile >> ticketPrice >> ticketsSold;
//outputting data to Atchley_Alex.txt
outFile << setw(10) << seatType << setw(5) << ticketPrice
<< setw(5) << ticketsSold << endl;
//calculating total ticket sales
grandTotal = (ticketsSold+grandTotal);
Now this might have not been TOTALLY neccissary to copy what I have so far. But! I do not know how to get to the second line of ticket-sales data. It reads the first one, the BOX string and the numbers after it just fine. HOWEVER, I don't know how to get it to go on a head and read the second one. I know i can set up a looping structure to make it repeat what it just did, but I don't know how to make it move on. Thanks for any help.
sorry if this has been covered in the FAQ, but I'm not sure what this would fall under.