I can't get my friends to work
Alexandre Oliva
oliva@dcc.unicamp.br
Thu Oct 30 12:13:00 GMT 1997
David Alan Gilbert writes:
> ll keeps its list of ll_elements and I want all the functions in 'll'
> to be friendly with ll_element so that ll methods can get to the next
> pointer in ll_element.
Make sure you declar all templates before referring to them:
template <typename content> class ll;
template <tyepname content> class ll_iter;
template <typename content> class ll_element;
And then you declare
> template<class content> ll_element {
^^ class keyword missing
> friend ll<content>;
> friend ll_iter<content>;
^^ I'd advise you to add class keywords here to, but I'm not
sure these are required.
> }
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list