c++ templates problems in g++

what we have:
class TClass {
public:
TClass();
};

template<class T> class FClass<T>: public T {
public:
FClass();
};

TClass::TClass() {
// some code
}

template<class T> FClass<T>::FClass : T() {
// some code
}

int main (int argc,char* argv[]) {
FClass<TClass>* FClass1 = new FClass<TClass>;
return 0;
}

g++ doesn't seem to like this code portion and failed to compile this, but Borland C++ Builed compiled this without any warnings.

What's wrong?

i misspelled some:
template<class T> FClass<T>::FClass() : T() {
//some code
}

hm... that's not my misspelling :frowning: this forum has completely erased all c++ templates tags :((((((
so this code looks wrong now :frowning:

See this thread on how to use angle brackets in posts: