I am currently porting some code from Visual studio to mingw and their are instances in the code when variables in the base class are being used inside the methods in a derived class. For instance
template<typename t>
struct base_foo
{
int foo;
};
template<typename t>
struct derived_foo : public base_foo<t>
{
void some_method();
};
template<typename t>
void derived_foo<t>::some_method()
{
foo = 12 ; //Error variable not declared in this scope
base_foo<t>::foo = 12 ; //OK
}
Now there are many instances like this in my code and wanted to know if there was a way for me to state that if there is a variable that isnt found locally look in the base class. In short if the following gives an error
foo = 12 ;
then try
base_foo<t>::foo = 12;