Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Compiler Error C2153

hex constants must have at least one hex digit

Hexadecimal constants 0x, 0X, and \x are not valid. At least one hex digit must follow x or X.

The following sample generates C2153:

// C2153.cpp
int main() {
   int a= 0x;    // C2153
   int b= 0xA;   // OK
}

Community Additions

ADD
Show:
© 2015 Microsoft