   mutual friend classes
  hi how do I make 2 template classes mutual friends?thanksYratelev 
template<typename T>class A;template<typename T>class B;template<typename T>class A{    friend class B<T>;};template<typename T>class B{    friend class A<T>;}; "Sneftel is correct, if rather vulgar." --Flarelocke ;  Or if you want all instantiations of A and B to be friends of each other instead of instantiations of the same type: template<typename T>class A;template<typename T>class B;template<typename T>class A{    template <typename T> friend class B;};template<typename T>class B{    template <typename T> friend class A;};;  I had the first one and wanted the second, cheers guyYratelev 