Compiler Error C2041
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C2041.
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;
Show: