Hi there,
I hope this is not a major repeat question.
I have a big class and inside it has smaller classes. What I am trying to do is call a function of the outer class from the inner nested class, such as:
class BigClass : public evenBiggerClass
{
int BigClassFunction()
{
return 10;
}
class SmallNestedClass
{
int i = BigClass::BigClassFunction();
}
};
needless to say I get an error stating ' illegal call on non-static member function' . I do know I could work around it (given the bigger picture of my code). But is there any way I could overcome this directly?
I also know I could declare BigClassFunction() as static but then I cant use other non-static variables in it.
Thanks,
- Denis