class User1 { public: User1() { u = new User2(); //Line exp } ~User1() { delete u; } private: User2* u; }
class User2 { public: User2(){} ~User2(){} }
TEST(test, InstantiateUser1) { User1* u = new User1(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)