'identifier' : 在區域定義類別中的靜態資料成員不合法
具有本機領域的類別、結構或等位的成員宣告為 static
。
下列範例會產生 C2246:
// C2246.cpp
// compile with: /c
void func( void ) {
class A { static int i; }; // C2246 i is local to func
static int j; // OK
};
'identifier' : 在區域定義類別中的靜態資料成員不合法
具有本機領域的類別、結構或等位的成員宣告為 static
。
下列範例會產生 C2246:
// C2246.cpp
// compile with: /c
void func( void ) {
class A { static int i; }; // C2246 i is local to func
static int j; // OK
};