如何从其嵌套类方法访问类属性?
class Class1
{
public:
int attribute;
void Method1() {
class Class2
{
public:
void Method2() {
//here I need to access attribute from Class1
}
};
}
};