CC1不能在类定义中初始化,为什么?那我将如何初始化它?
class X
{
public:
X(){}
const char CC1 = 25; // Line1
static const int SCI = 50; // Line2
} ;
int main()
{
X Obj1;
}
CC1不能在类定义中初始化,为什么?那我将如何初始化它?
class X
{
public:
X(){}
const char CC1 = 25; // Line1
static const int SCI = 50; // Line2
} ;
int main()
{
X Obj1;
}