TITLE: Templates and friends PROBLEM: tim@cometric.COM (Tim Sampson) I have a template class (kid) with a function (sound) which would like to call a private function (oink) of a a non-template class (wanta). As hard as I try I cannot figure out how to make the template class a friend of the non-template class. class wanta { friend class kid; // does no good. private: void oink (); }; ... template class kid: public pa { public: void sound () {be->oink ();} }; RESPONSE: steve@taumet.com (Steve Clamage) The problem is that there is no class "kid" in your program; there is a template class kid, which is a shorthand for an unbounded set of different classes with different names. You can make individual template instantiations friends of class wanta, but I don't think there is a way to make all possible instantiations into friends of wanta. For example: template class kid; // forward declaration class wanta { ... friend kid<10>; friend kid<39>; ... }; In this case, it might make sense to make the int a parameter of the constructors of a non-template class kid, rather than a template parameter. I can't tell from the posted code whether this would be a good solution or not. Otherwise, you could make wanta::oink into a public function, or provide a public function which provides what you want from oink without making it completely public.