template troubles

N

Nikolay Moskvichev

Hi,
When porting application to linux we get
compilation errors (undefined variable p in function GetValue())
from gcc 3.4.1 but it compiles well on windows with msvc 7.1
what is problem here ?

template<class T> class A
{
public:
T p;
};

template<class T> class B : public A<T>
{
public:
T GetValue() const {return p;}
};
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top