G
Gernot Frisch
This code works on VC7.1. But VC6 refuses to compile.
class foo
{
class bar
{
friend class foo;
foo & m_f;
public:
bar(foo & f) : m_f(f) {}
void wii()
{
m_f.poo(); // #error C2248
}
} m_bar;
void poo() {}
public:
foo() : m_bar(*this) {}
};
error C2248: 'poo' : cannot access private member declared in class
'foo'
What can I doo?
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com
class foo
{
class bar
{
friend class foo;
foo & m_f;
public:
bar(foo & f) : m_f(f) {}
void wii()
{
m_f.poo(); // #error C2248
}
} m_bar;
void poo() {}
public:
foo() : m_bar(*this) {}
};
error C2248: 'poo' : cannot access private member declared in class
'foo'
What can I doo?
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com