Hi everyone,
as the title states I have a question about templates definitions. I have defined a Stack<T> class and a BinaryTree<T> class and both work fine, in fact I can have stacks (or trees) of integers, doubles or any other object. However, if I declare a stack of trees of pointer to characters as follows:
Code:
Stack<BinaryTree<char*>> stack;
I get a compiling error regarding the templates definition. I thought this worked as for Java, where that statement would be fine since the tree and the stack classes supported generic objects, but I suppose I had it wrong! What am I missing?.. Am I obliged to define the stack template differently?
Cheers