How-To: Get valid integer input in C++ (a stupidly long solution to a stupidly simple problem)