I have code that reads and writes sstrings to file but I am having trouble meeting these requirements. My program writes the string names into the file and not the number of bags. I think a for loop is needed to keep track of how many times their name is written and then check their on board status but I\'m not sure. This is the code I have #include #include #include using namespace std; int openOutputFile(); int openInputFile(); void readInputRecord(ifstream& inpt); void writeOutputRecord(ofstream& opt); int count_b = 0; int count_p = 0; string PassengerArray[100]; string BaggageArray[300]; int main() { openInputFile(); openOutputFile(); system(\"pause\"); } void readInputRecord(ifstream& inpt) { string line; int i = 0; //read passanger from file while (getline(inpt, line)) { PassengerArray[i] = line; i++; } cout << \"Passanger Array \" << endl; for (int k = 0; k Solution while (getline(inpt, line) && line != \"\") { BaggageArray[i] = line; i++; } count_b = i; cout << \"Baggage Array\" << endl; for (int k = 0; k.