Yes I just realised that must have been the problem.
Since I'm using the cin to pause the program -that is causing the problems. In most cases this wouldn't matter but in this particular case it does.
However, when I use getch(); to pause the program it works.
Although, secondly I noticed if I enter:
shouldn't this return an error?Code:123abc23 the output is>> the integer you entered was: 123