Trailing u in Hex Number C/C++
10,355
Appending u
to any integral constant makes the compiler interpret it as unsigned.
Author by
ace
Updated on July 18, 2022Comments
-
ace almost 2 years
Possible Duplicate:
Meaning of U suffixI'm going through code that has a bunch of defines that look like: #define HEX_NUMBER (0x000000FFu)
What is the trailing u? I've tried compiling with and without it and I don't see any difference.
-
Kerrek SB over 12 years"interpret" is a bit misleading. What's happening is that the type of the literal expression is an unsigned type.