title: Trying to create new instance of class using template, unexpected error
body: <p>Trying to make a <strong>B</strong> inary <strong>S</strong> earch <strong>T</strong> ree (BST for short) using a template.</p>
  
  <p>When I try to create a new instance of my BST I get an unexpected error. I hope the solution does not involve pointers since I would like to keep them at a minimum.</p>
  
  <p>For now I have:</p>
  
  <pre><code>template &lt;typename Type&gt;
  class BST {                 // The binary search tree containing nodes
  private:
      BSTNode&lt;Type&gt; *root;    // Has reference to root node
  
  public:
      BST ();
      bool add (int, Type);
  };
  </code></pre>
  
  <p>And the Node type:</p>
  
  <p><strong>EDIT:</strong> When I cut out code to un-encumber text, I forgot the constructor, now it's been added</p>
  
  <pre><code>template &lt;typename Type&gt;
  class BSTNode {    // Binary Search Tree nodes
  private:
      int key;       // we search by key, no matter what type of data we have
      Type data;
      BSTNode *left;
      BSTNode *right;
  
  public:
      BSTNode (int, Type&amp;); 
      bool add (int, Type);
  };
  </code></pre>
  
  <p><strong>EDIT2:</strong> Here is the actual constructor</p>
  
  <pre><code>template &lt;typename Type&gt;
  BSTNode&lt;Type&gt;::BSTNode (int initKey, Type &amp;initData) {
       this-&gt;key = initKey;
       this-&gt;data = initData;
       this-&gt;left = NULL;
       this-&gt;right = NULL;
  }
  </code></pre>
  
  <p>I want to try and test if anything works / doesn't work</p>
  
  <pre><code>BSTNode&lt;int&gt; data = new BSTNode (key, 10);
  </code></pre>
  
  <p>And I get: Expected type specifier before BSTNode. I have no idea what I'm doing wrong, but one thing I do hope is I don't have to use data as a pointer. </p>
  
  <pre><code>BSTNode&lt;int&gt; data = new BSTNode&lt;int&gt; (key, 10);
  </code></pre>
  
  <p>Also does not work, seems it believes <code>&lt; int &gt;</code> is <code>&lt; &amp; int&gt;</code>  and it doesn't match</p>