type conversion

How to insure that unsigned int is higher in the hierarchy than int?
what do you mean by 'hierarchy'?
The rank of any unsigned integer type shall equal the rank of the corresponding signed integer type.
peter, where is it from?
And what does it mean?Means an integer will remain an integer, or chaned to an unsigned int, when added to an unsigned?
It's from the standard. I wasn't sure so I assumed you meant integer conversion ranks.

If you add a signed int and an unsigned int the signed int will be converted to unsigned int before the addition take place. This is described in §5/9 as the usual arithmetic conversion.
Last edited on
Topic archived. No new replies allowed.