D
dobest03
Hi.
Are there any way to access the integer member 'a' of outer structure
from
inner structure's member function func_inner()?
See below the structure...
Thanks.
struct outer {
int a;
struct inner {
int b;
void func_inner(void)
{
cout << "Inner func" << endl;
cout << "inner b: " << b << endl;
//cout << "outer a: " << outer::a << endl;
//cout << "outer a: " << a << endl;
}
} i;
void func_outer(void)
{
cout << "Outer func" << endl;
cout << "inner b: " << i.b << endl;
cout << "outer a: " << a << endl;
}
};
Are there any way to access the integer member 'a' of outer structure
from
inner structure's member function func_inner()?
See below the structure...
Thanks.
struct outer {
int a;
struct inner {
int b;
void func_inner(void)
{
cout << "Inner func" << endl;
cout << "inner b: " << b << endl;
//cout << "outer a: " << outer::a << endl;
//cout << "outer a: " << a << endl;
}
} i;
void func_outer(void)
{
cout << "Outer func" << endl;
cout << "inner b: " << i.b << endl;
cout << "outer a: " << a << endl;
}
};