Error log
Text
Octal value is out of range
1> E:\CProject\test12\Source. c(5,10): error C2041: illegal digit ‘8’ for base ‘8’
Hexadecimal value is out of range
1> E:\CProject\test12\Source. c(5,10): error C2059: syntax error: ‘bad suffix on number’
1> E:\CProject\test12\Source. c(5,10): error C2153: integer literals must have at least one digit
1> E:\CProject\test12\Source. c(5,13): error C2021: expected exponent value, not ‘;’
1> E:\CProject\test12\Source. c(5,10): warning C4244: ‘initializing’: conversion from ‘double’ to ‘int’, possible loss of data
1> Done building project “test12.vcxproj” – FAILED.
Screenshot (hexadecimal value exceeds the range)
Solution:
C2041 series error: this kind of number, which is generally octal or hexadecimal, is out of range
for example:
- 09; because there is no 9 in octal
- 0xq; because hex doesn’t have the q character.
This requires us to carefully check whether the relevant figures exceed the range.
Read More:
- [Solved] URIError: Failed to decode param ‘/%3C%=%20BASE_URL%20%3Estatic/index.%3C%=%20VUE_APP_INDEX_CSS_HASH%20%3E.css’
- bazel Compile Error: absl/base/policy_checks.h:79:2: error: #error “C++ versions less than C++14 are not supported.”
- [Solved] winnt.h a large number of file errors (287): error c2059: syntax error: “;”
- [Solved] Error: error C2601: ‘b‘ : local function definitions are illegal error C2063: ‘b‘ : not a function
- [Solved] std::max() error C2589: ‘(‘ : illegal token on right side of ‘::‘
- [Solved] Keil C Error: error C141: syntax error near ‘=‘, expected ‘__asm‘
- Implement base64_decode in GO language to solve the problem of illegal characters
- How to Solve Fatal error stdatomic in C/C++ Compilation
- C++:error C2872: ‘byte‘: ambiguous symbol [How to Solve]
- Grpc Compilation issues: “C++ versions less than C++11 are not supported.
- Cmake Setting Support C++11 This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options
- [Solved] Error c2226: syntax error: unexpected ‘lpstr’ type
- Cannot start container 39f96c64a9c6: [8] System error: exec format error
- [Solved] fatal error C1189: #error: STL1003: Unexpected compiler, expected C++ compiler
- [Solved] error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools“
- [Solved] Console error: syntax error: illegal return statement
- [Solved] Error: Waveform5.vwf.vt(30): near “1“: syntax error, unexpected INTEGER NUMBER, expecting ‘)‘ Erro
- [Solved] Shell loop execute error: syntax error: bad for loop variable
- C++ BUG: [Error] invalid array assignment
- IOS Adds C File Error [How to Solve]