Write Program Named Trainboardingcc Receives Two Command Line Arguments Name Input File Nu Q37026635

Write a program named train_boarding.cc that receives twocommand line arguments, the name of an input file and a number. Thefile contains a list of passengers (each identified by a uniqueinteger), in the order that they arrive for train. The number onthe command line (a positive integer) indicates the number of seatsin the first class.

$ ./train_boarding Usage: ./train_boarding <input_file> <fclass_cap>$ ./train_boarding passengers10.dat Usage: ./train_boarding <input_file> <fclass_cap>$ ./train_boarding wrong_file 7Error: cannot open file wrong_file$ ./train_boarding passengers10.dat -1Error: invalid first class capacity

i just need to see how to impleament these checks and print outthe following error statments that it in c++11 thats it

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.