[osg-users] Friend functions

David Callu ledocc at gmail.com
Sat Sep 1 10:02:57 PDT 2007


try it

2007/9/1, Renan Mendes <renanmzmendes at gmail.com>:
>
> 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
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070901/ebe6166e/attachment-0003.htm>


More information about the osg-users mailing list