Can't use a class as template type in another class?
<p>I have a class Stack, using template, one of its methods is "push", which is written below:</p>

<pre><code>template &lt;class T&gt;
void Stack&lt;T&gt;::push(T _data){
    Node&lt;T&gt;* temp = new Node&lt;T&gt;;
    temp-&gt;data = _data;
    temp-&gt;next = head;
    head = temp;
}
</code></pre>

<p>The stack works well with <code>int</code>, <code>double</code>, <code>string</code>, <code>char</code>....
But it says</p>

<pre><code>prog.cpp:32: note: synthesized method ‘Node&lt;Tree&gt;::Node()’ first required here
</code></pre>

<p>when I use a class "Tree" as data type.
I don't understand, why it works with "string" but not with "Tree", they are both classes, not primitive types.</p>

<p><a href="http://ideone.com/NMxeF" rel="nofollow">http://ideone.com/NMxeF</a>
(Ignore the other error, my IDE only gives one error at line 32 and some warnings)</p>

<p>Help!</p>
