I am trying to inherit a template in C++. This template is using a namespace NSA, the Child Class has also a namespace called NSB. I want to access the protected variables of the template inside a third Class. But I don't know how.
Those are headers:
NSA{
template <typename T> class A{
protected:
unsigned int my_var;
}
}
NSB{
class B{ #Don't know how to inherit template A
...
}
}
Inside the cpp file of class C (all header files are included)
using namespace NSA;
NSB{
unsigned int x = my_var #Get an error. Unidentified
...
}
Thank you.