Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 31,572 of 33,346    |
|    =?windows-1252?Q?Daniel_Kr=FCgler?= to All    |
|    Re: member function as friend of a class    |
|    16 Oct 11 16:09:16    |
      970ee117       From: daniel.kruegler@googlemail.com              Am 16.10.2011 15:29, schrieb Ethan:       > I'm trying to have a member function of a class to be a friend of       > another class, however, i get this error       > Am i missing anything?              You are missing that for a friend declaration to another class's member       function the other class must be complete at the point of the friend       declaration.              > main.cpp:10: error: invalid use of incomplete type ‘struct B’       > main.cpp:3: error: forward declaration of ‘struct B’       >       > #include |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca