Well simple really: Is there any header, libray, dll, etc. that defines Infenity in any way?

#include <limits>
#include <iostream>

int main()
{
    std::cout << "does the type double have a representation for positive infinity? "
              << std::boolalpha << std::numeric_limits<double>::has_infinity << '\n' ;

    // if the answer was true, representation of positive infinity.
    const double infinity =  std::numeric_limits<double>::infinity() ;

    // maximum possible [B]finite[/B] value.
    const double max_value = std::numeric_limits<double>::max() ;

    // they are obviously not equal
    std::cout << "is max_value equal to infinity? " << ( max_value == infinity ) << '\n' ;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.