When you do std::cin.getline(choice,25) at line 13 it will read up to 25 characters and store them in choice. If you enter 10 characters, it will store those 10 and a terminating null byte, but the remaining 14 characters contain whatever undefined bytes happen to be at that location.
Then at line 64 you are looping through all 25 characters instead of just the 10 that are valid. To fix this, change line 64 to: for (int n = 0; choice1[n]; n++)