Why does'nt the following code work?
#include <iostream>
class X
{
public:
X()
: m(0)
{ }
virtual ~X()
{ }
protected:
int m;
};
class Y : public X
{
private:
class Z
{
void do_something()
{
std::cout << m << std::endl;
}
};
};
I get invalid use of nonstatic data member ‘X::m’
Thanks for help!
Niels