Need C++ help to understand the steps taken to build a Struct record array the following specifications to build the program with the states file.
Records in the States.txt file contain two fields that are loaded into component fields of a struct array. #include
include include using namespace std; struct stateRecord Each state records contains a two-character state postal code and the full name of the state or district. These fields are loaded into two separate parallel arrays. The relative position of a state code in one array is the same as the corresponding state name in the other array Statestt-Noteped stringstateCode; string stateName; AK Alaska AL Alabama AR Arkansas AZ Arizona CA California Co Colorado CT Connecticut DC District of Colunbia DE Delavare int main() stateRecord stateInfo[60]; string codeInput int int cnt 8; pos; VA Virginia ifstream stateInput; stateInput.open("States.txt"; if (IstateInput) VT Vermont WA Hashington NI Wisconsin W West_Virginie WY Wyoming cout stateInfo[cnt].statecode stateInfo[cnt].stateName; read first record while (IstateInput.eof()) cnt++; /l/ count records stateInput stateInfo[cnt].stateCode >> stateInfo[cnt].stateName; / read next record stateInput.close(); cout codeInput; while (codeInput "Q"&8 codeInput 1- "q") // close file after load /l display count // state code prompt // input state code // continue until Quit pos = while (code1nput != stateInfo(pos].statecode && pos > codeInput; // state code prompt / input state code After the loop ends, display the state label if the code has been matched. Otherwise, show that no match was found. nmming read Records in the States.txt file contain two fields that are loaded into component fields of a struct array. #include include include using namespace std; struct stateRecord Each state records contains a two-character state postal code and the full name of the state or district. These fields are loaded into two separate parallel arrays. The relative position of a state code in one array is the same as the corresponding state name in the other array Statestt-Noteped stringstateCode; string stateName; AK Alaska AL Alabama AR Arkansas AZ Arizona CA California Co Colorado CT Connecticut DC District of Colunbia DE Delavare int main() stateRecord stateInfo[60]; string codeInput int int cnt 8; pos; VA Virginia ifstream stateInput; stateInput.open("States.txt"; if (IstateInput) VT Vermont WA Hashington NI Wisconsin W West_Virginie WY Wyoming cout stateInfo[cnt].statecode stateInfo[cnt].stateName; read first record while (IstateInput.eof()) cnt++; /l/ count records stateInput stateInfo[cnt].stateCode >> stateInfo[cnt].stateName; / read next record stateInput.close(); cout codeInput; while (codeInput "Q"&8 codeInput 1- "q") // close file after load /l display count // state code prompt // input state code // continue until Quit pos = while (code1nput != stateInfo(pos].statecode && pos > codeInput; // state code prompt / input state code After the loop ends, display the state label if the code has been matched. Otherwise, show that no match was found. nmming read