class Pencil {
public: int core = 10; //エラー
void Write() {
core -= 1;
if (core < 0) { cout << "0"; }
}
int main(){
while ( core >= 0 ) { Write(); }
return 0;
}
};
C++でクラスフィールドのメンバを、コンストラクタを使わず初期化しようとしたらエラーになるんですが
これはどういう制約でエラーになってるんですか?