Im in the midst of doing my C++ project that is ticket booking system.
I have encountered a small problem(at least now), that is i dont know how to keep the number running.
What i want to do is to define ticket #1-#100 belong to movie1 and so on.
My question is how do i need to define how the ticket number should run without making the program loop until the limit is reached. I try using For while and it keeps looping?
I also need to display the ticket number on the DOS output windows.
I assume that when you (re)start your program you load the file(s) back it and initialize an array (?) with the existing booking in. And you file must somehow store ticket no -> person.
So, assuming you're allocating tickets contiguously (no holes!), then you should know, after loading the file, the next free slot for a film.
I am also assuming that you're keeping the following data for each movie: name, ticket block start, ticket count, next free ticket (= tickets sold)