public: virtual void quack() {
		for (std::vector<Quackable*>::iterator it = quackers.begin(); quackers.end() != it; ++it) {
			Quackable* quacker = *it;
			quacker->quack();
		}
	}
Пример #2
0
	void simulate(Quackable& duck){
		duck.quack();
	}
Пример #3
0
 void quack()
 {
     duck->quack();
     numberOfQuacks++;
 }