what is an unsigned integer?
This is a discussion on simple question within the C++ Programming forums, part of the General Programming Boards category; what is an unsigned integer?...
what is an unsigned integer?
+++
++
+ Sekti
++
+++
umm.. its an unsigned integer....
meaning... un-negative, positive only...
so if you call a unsigned int and its value is less than 0 it will say 0 instead of -(number here)
What is C++?
>what is an unsigned integer?
An integer that cannot hold negative values, so instead of spanning a certain length into the negative field and a certain length into the positive field, an unsigned integer uses all of its bits for positive values. For example:
On my system, the max and min values of a signed integer are 2147483647 and -2147483648, respectively. The max and min values of an unsigned integer are 4294967295 and 0. In the unsigned version, all of the bits are used for a positive value and thus can have a higher value than a signed int.
-Prelude
My best code is written with the delete key.