If you wish to initialise your array elements to zero, you can declare the array using the following syntax (This means you don't need to loop through and do it manually)
Code:
int bookings[100] = { 0 }; Also, what output are you expecting to get? What output are you actually getting?
Could you give a few lines of your input file as an example of the data you're trying to read? I can't see any obvious problems with your code, except that when you use your
flightpas variable in your array subscript, you've not checked that its a valid index for your bookings array (ie, a number in the range 0-99). This may or may not be a problem depending on your input file.