In this example program class Derived<T> inherits from Base<T>. Yet an unqualified name lookup of a base class member fails within Derived<T>::print. If the identifier is qualified (Base<T>::numberBase) then it works. foo.cc: In member function `void Derived<T>::print()': foo.cc:16: error: `numberBase' was not declared in this scope #include <cstdio> template <class T> class Base { protected: int numberBase; }; template <class T> class Derived : public Base<T> { public: void print() { printf("bn = %d\n", numberBase); } }; int main() { Derived<int> d; d.print(); return 0; }