cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Infinite value
Infinite value
Apr 6, 2009 at 10:11pm UTC
luckycusp
(105)
Hallo
Is there any predefined constant in C++ which I can use for infinite value. I have lots of mathematical calculations to do, and it would be convenient i have such a variable.
Thanks
Apr 6, 2009 at 10:17pm UTC
luckycusp
(105)
ok... i got the answer!
I can use some constants for example DBL_MAX
Apr 7, 2009 at 12:44pm UTC
Bazzy
(6281)
better is
numeric_limits<
double
>::infinity()
http://www.cplusplus.com/reference/std/limits/numeric_limits.html
Topic archived. No new replies allowed.