Ok, please bear with me as I'm a "newbie" to both forums and C++.
I'm writing a program that converts between Celsius, Fahrenheit, and Kelvin for a C++ class project and I'm stuck on this one part:
When it asks for a numerical value (the value you want converted) if you enter something other than a number, a string, character, what have you, it gets stuck cycling through an endless loop. Essentially it breaks the program.
My instructor mentioned that there was some way to for the computer to check if it was a numerical input or not. He was unclear as to how this was done, vaguely suggesting the function ISNUMERIC. However, I don't know if you need a specific compiler directive to enable this function or even how to use it whatsoever.
I've done some looking around but haven't found any concise examples of how to implement this approach, or any other for that matter.
What I am trying to do is find some if statement that will check if the input is a numerical value and if it isn't then display some kind of "Invalid entry" message that will kick you back into the "Please enter the value you want converted." message.
Any suggestions or advice would be incredibly appreciated.