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();
	}
Esempio n. 3
0
 void quack()
 {
     duck->quack();
     numberOfQuacks++;
 }