access to private members of internal class
From: Shea Martin (smartin_at_arcis.com)
Date: 04/08/04
- Next message: Shea Martin: "Re: parameter argc is never used ?"
- Previous message: Claudio Puviani: "Re: High performance alternative to MI of virtual bases"
- Next in thread: John Harrison: "Re: access to private members of internal class"
- Reply: John Harrison: "Re: access to private members of internal class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 08 Apr 2004 15:14:39 -0600
Class A
{
public:
class B;
int funct(const B &b);
};
Class A::B
{
private:
int _member;
};
int A::funct(const A::B &b)
{
return 10*b._member; //won't compile
}
////////////////////////////
The above code will not compile, as I get a error to the effect of
member _member not accessable from A::funct(const A::B&)
Is there anyway around this, short of declaring _member to be public?
Thanks,
~S
- Next message: Shea Martin: "Re: parameter argc is never used ?"
- Previous message: Claudio Puviani: "Re: High performance alternative to MI of virtual bases"
- Next in thread: John Harrison: "Re: access to private members of internal class"
- Reply: John Harrison: "Re: access to private members of internal class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|