1 2 3 4 5 6 7 8 9 10 11
#include <iostream> class A { public: void f() {std::cout << "A::f()\n";} }; A* foo() { A* a = new A; return a; }