let's say user enter 1, the program will promt user to enter a txt file. whenever user input a txt file. my main menu will loop 2 times. how do i stop it from it looping 2 times. the function getinteger used to ignore other input other than integers.
Consider using a switch instead of the do loop. Make sure the switch has a default: case to catch bad input. Put it inside a while loop that is controlled by a bool Quit value. Provide a quit option in the menu.