11

Possible Duplicate:
Meaning of U suffix

I'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.

Community
  • 1
  • 1
ace
  • 865
  • 2
  • 15
  • 24

1 Answers1

18

Appending u to any integral constant makes the compiler interpret it as unsigned.

zneak
  • 134,922
  • 42
  • 253
  • 328
  • 3
    "interpret" is a bit misleading. What's happening is that the *type* of the literal expression is an unsigned type. – Kerrek SB Dec 14 '11 at 18:45