I'm writing a fairly simple application. Below is the part of the code that is giving me troubles. The headers I have are:
This is just one function of few. It is supposed to ask the user for an integer, check that it's an integer and return the value to the main function. However, whenever I enter an integer during runtime, it somehow gets a crazy value (ie. I enter 15, it gets 238 or something).
I'm not sure what's wrong with it... It has worked before at the university with a different compiler, but I don't know how that would make a difference. I'm using the same idea for another function and it works there. Any help would be greatly appreciated.