S
Shea Martin
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
{
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