If you want system("PAUSE"); You need to #include <windows.h> .
What compiler/IDE/OS are you using? If you're using Visual Studio, press CTRL+F5 to run the program from a console with an automatic PAUSE in there.
If you're on windows without VS, press WIN+R, then type "cmd". use the cd command to get to the output path of your compiler/linker. Then run the executable from there. The console will not pause.
The problem is that on line 13, your cin >> operation will leave extra input (the non integer information) in the buffer, so later on line 26 the ignore will obtain this input and ignore it.
The solution is to place another std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' ); after the lines where are you using formatted input (like line 13).