Determining Data type with CIN
Thanks for taking the time to read this, and any replies are much appriciated.
I am looking for a way to determine the type of data that the user has inputed into my program. For example: When I ask the user to input an integer, and they enter a letter or a word, the program loops, and ultimately crashes. I would like to prevent this, by checking the value and either accepting or rejecting it (if this is even how this works) before the program.. tries to use it? and crashes.
Thanks for any reply.
|