public: virtual void quack() { for (std::vector<Quackable*>::iterator it = quackers.begin(); quackers.end() != it; ++it) { Quackable* quacker = *it; quacker->quack(); } }
void simulate(Quackable& duck){ duck.quack(); }
void quack() { duck->quack(); numberOfQuacks++; }