H
Helge
I have a prbl. cannot seem to compile this simple code: (might this be a
bug?)
gcc version 4.1.2
//Begin code
template <class T>
class FirstClass{
public:
T a;
};
template <class T>
class SecondClass : public FirstClass<T>{
public:
T func(){return a;}
};
int main(){}
//End Code
Compiler
test.cpp: In member function ‘T SecondClass<T>::func()’:
test.cpp:10: error: ‘a’ was not declared in this scope
bug?)
gcc version 4.1.2
//Begin code
template <class T>
class FirstClass{
public:
T a;
};
template <class T>
class SecondClass : public FirstClass<T>{
public:
T func(){return a;}
};
int main(){}
//End Code
Compiler
test.cpp: In member function ‘T SecondClass<T>::func()’:
test.cpp:10: error: ‘a’ was not declared in this scope