R
ramunasg
Hello,
g++ refuses to compile the following code, by saying that "pt" is not
in the scope of "Second" class (when I add scope by changing "pt = 0"
to "First<T>:
t = 0" g++ comples clenely), but VC++ 8 compiles without
problems. So my questions is what is the syntax (and semantics) for
accessing protected members in templeted classes?
template <class T>
class First {
protected:
T *pt;
};
template <class T>
class Second public First<T> {
public:
Antras() { pt = 0; }
};
Thanks in advance
g++ refuses to compile the following code, by saying that "pt" is not
in the scope of "Second" class (when I add scope by changing "pt = 0"
to "First<T>:
problems. So my questions is what is the syntax (and semantics) for
accessing protected members in templeted classes?
template <class T>
class First {
protected:
T *pt;
};
template <class T>
class Second public First<T> {
public:
Antras() { pt = 0; }
};
Thanks in advance