cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Integer checks
Integer checks
May 3, 2015 at 1:58pm UTC
CorvetteDude427
(8)
Is there an Standard Library function that can check to see if a number is, in fact, a number? Or would I have to define a function of my own?
Thanks in advance.
Last edited on
May 3, 2015 at 2:37pm UTC
May 3, 2015 at 2:26pm UTC
Cubbi
(4774)
There is a standard library function isnan() which will check if a floating-point number is indeed a number:
http://en.cppreference.com/w/cpp/numeric/math/isnan
http://www.cplusplus.com/reference/cmath/isnan/
Integer numbers are always numbers, that guarantee is part of the type system.
Topic archived. No new replies allowed.