I'm having a difficulty trying to write a program with one-dimensional parallel arrays. The two arrays are the 6 ids with string and output which is 6 total of hours each id worked in integer. I also have to input hours which will add up to the total. This program would be in a loop to do as many times as I want. I got to display each arrays in the end.
So, I initialized them to
string id[6] = {"alb", "asd", "ase", "azx", "aqw", "acb"};
int total[6] = {0};
string searchId = " ";
int hours = 0;
Then I have while loop that starts the program.
Then here, how would I do to search through ids and if it doesn't match, display an error message? If it matches, ask to input the hours. I know it takes if statement...and maybe some kind of loop either while or for? because the ids are string, so it's different from just numbers.