O
template<class KeyType,class Type,template<class,class> class Container,class Allocator=std::allocator<Type> >
class tree{
private:
typedef node<KeyType,Container<Type,Allocator> > node;
typedef node* pNode;
pNode baseNode;
pNode begin;
pNode end;
public:
pNode addNode(KeyType Key,Type Value){
}
};
ich hab das jetzt so gemacht, aber in der funktion addnode(die ich erstmal nur als testfunktion eingebaut hatte, da der bcb mit mehr als einem templateparameter nich gut klarkommt)wirft er mir beim compilieren nen fatal error:internal compiler error,diesen fehler wirft er später dann jedes mal, wenn ich mit dem mauszeiger über node/pNode komme...
//edit hab jetzt ne möglichkeit gefunden, wie ich das umgehen kann...btw, kann es sein, dass typedefs nich mit vererbt werden? hab das zuerst versucht, doch das wollte der net^^
ok so funktionierts:
template<class Type,class Allocator,template<class,class> class Container>
class containerType{
public:
typedef Container<Type,Allocator> container;
};
template<class KeyType,class Type,template<class,class> class Container,class Allocator=std::allocator<Type> >
class tree{
private:
typedef node<KeyType,containerType<Type,Allocator,Container>::container> node;
typedef node* pNode;
pNode baseNode;
pNode begin;
pNode end;
public:
pNode addNode(KeyType Key,Type Value){
}
};