Export (0) Print
Expand All
Expand Minimize

Compiler Error C2041

Error Message

illegal digit 'character' for base 'number'

The specified character is not a valid digit for the base (such as octal or hex).

The following sample generates C2041:

// C2041.cpp
int i = 081;   // C2041  8 is not a base 8 digit

Possible resolution:

// C2041b.cpp
// compile with: /c
int j = 071;

Community Additions

ADD
Show:
© 2014 Microsoft