分享方式:


編譯器錯誤 C2041

基底 'number' 的不合法數位 'character'

指定的字元不是基底的有效數字(例如八進位或十六進位)。

下列範例會產生 C2041:

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

可能的解決方式:

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