class visionary; //forward declaration template <> //specialization of a template class class game: public virtual game_base { game(const terminal_t::value_type& c = '.'): game_base(c) {} friend class visionary; typedef master_t::const_iterator const_iterator; const_iterator begin() const {return master.begin();} const_iterator end() const {return master.end();} //a friend of class wabbit void difference(const wabbit *w1, const wabbit *w2, int *dx, int *dy); }; class visionary: public virtual wabbit { game *const g; game *get_game() const {return g;} terminal_t::difference_type decide() const {g->begin();} };