class Test
{
public:
Test():a(0){}
enum {size1=100,size2=200};
private:
const int a;//只能在構造函數初始化列表中初始化
static int b;//在類的實現文件中定義並初始化
const static int c=1;// 只能在類中初始化
};
int Test::b=0;//static成員變量不能在構造函數初始化列表中初始化,因爲它不屬於某個對象。static不能加