help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Confused about friend operators, namespaces, and private members...


From: Robert Heller
Subject: Re: Confused about friend operators, namespaces, and private members...
Date: Wed, 18 Nov 2009 08:16:19 -0600

At Wed, 18 Nov 2009 05:05:37 -0800 (PST) "crimaniak@googlemail.com" 
<crimaniak@googlemail.com> wrote:

> 
> On 17 =D0=BD=D0=BE=D1=8F, 23:56, Robert Heller <hel...@deepsoft.com> wrote:
> 
> > ./../../C++/ParserClassesBoost/TrackGraph.h:747: error: `float Parsers::T=
> rackGraph::Transform2D::matrix[3][3]' is private
> > ./../../C++/ParserClassesBoost/TrackGraph.cc:675: error: within this cont=
> ext
> > ...
> > I don't understand these error messages. =C2=A0
> 
> Variable matrix is private for Transform2D, but you try to access it
> from TrackGraph class.

No, I am not! Variable matrix is private for Transform2D and is accessed
by *friend* operator * (friend of Transform2D).  This code compiles just
fine *without* the namespace declarations, but fails to compile with the
namespace declarations.

> 
>                                                                               
>                                                 

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller@deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/
                                                     


reply via email to

[Prev in Thread] Current Thread [Next in Thread]