why BASE *base_0 = new BASE(); //error? does it allocate memory when the class is defined?
class BASE {
public:
int *i = new int(5);
BASE *base_0 = new BASE();
static const BASE base_1;
static BASE base_2;
~BASE() {
cout << "~";
}
};
Aucun commentaire:
Enregistrer un commentaire