18 class Sphere : public Shape
26 Geometry(Shape *shape) { assert(shape); }
27 void add(Shape *shape) { assert(shape); }
35 typedef std::vector<void*> ASomething;
46 A() { std::cerr << "A::A" << std::endl; }
47 ~A() { std::cerr << "A::~A" << std::endl; }
50 const std::string & get_string(const std::string& a="") {return a;}
51 void doFunc() { std::cout << "A::doFunc()" << std::endl; func(); }
52 virtual void func() { std::cout << "A::func()" << std::endl; }
58 B() { std::cout << "B::B" << std::endl; }
59 ~B() { std::cout << "B::~B" << std::endl; }
61 void do_something() { std::cout << "B::do_something()" << std::endl; }
65 void useB(B* b) { b->do_something();