But this just checks the input.I want an integer or other kinds of numeric values but not a string.
Is there a method that can use the input as numeric values at the same time it can be checked? **************************************
I love tek-tips.com very,very,very,very,... much!
Hi,
cin.fail() seems not work.
maybe sizeof can be used depending on different sizes of fundamental types.But it can not separate int from long or float.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.