[osg-users] Friend functions

Renan Mendes renanmzmendes at gmail.com
Sat Sep 1 09:33:50 PDT 2007


Hello,

I've got a small question that I've not been able to answer looking at c++
tutorials:
- Can friend functions call other methods from the classes they are friends
with?

Example

class First
{
     public:
          void function1();
};

class Second
{
     public:
          void function2();

     friend void First::function1();
};

First::function1()
{  function2();  }


Thanks.

Renan M Z Mendes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070901/947d1636/attachment-0002.htm>


More information about the osg-users mailing list