class Coo2 { public: Coo2() : p(new int(0)) {} ~Coo2() {delete p;} int const * getP() const { *p = 1; return this->p; } private: int* p; };