infinite numner sign...

I know that the infinite sign is like 8 but flat... what about in c++? how would code/type the infinite number sign/code?

thx
You cannot.

A 16bits long or a 32bits long value always has a max value depending on whether it is signed or not.

Find INT_MIN and INT_MAX in limits.h.

http://www.cplusplus.com/reference/climits/
Last edited on
closed account (LA48b7Xj)
1
2
3
4
5
6
7
8
9
10
#include <iostream>
#include <limits>
int main()
{
    double max = std::numeric_limits<double>::max();
    double inf = std::numeric_limits<double>::infinity();
 
    if(inf > max)
        std::cout << inf << " is greater than " << max << '\n';
}

http://en.cppreference.com/w/cpp/types/numeric_limits/infinity
Last edited on
hello WheatFieldOnFire,

This worked for me:

1
2
char ch{ ' ' };
ch = static_cast<char> (0xEC); 


Hope that helps,

Andy
Topic archived. No new replies allowed.