10

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
  • 825
  • 2
  • 13
  • 24

1 Answers1

17

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

zneak
  • 130,082
  • 41
  • 248
  • 315
  • 2
    "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