title: return new BinarySearchTree - argument list for class template is missing
body: <p>We have an assignment to create a Binary Search Tree with some basic functions. I feel I'd be capable of scraping by if it weren't for the files included with the assignment that we need to adhere to in order for the graders to implement our code with their grading program. Students are given a file called "Factory.cpp" which has a function that attempts to return an object of "BinarySearchTree" (<code>return new BinarySearchTree();</code>). However, VS 2013 gives me the error seen in the title. After some research, I can't find any infomration I can implement into my own problem to get rid of the error. Template classes are obviously more abstract and I can't find out what to include/leave out, etc to make things work.</p>
  
  <p>The following is my <strong>incomplete</strong> code I have so far in my BinarySearchTree.h:</p>
  
  <pre><code>#pragma once
  #include "BSTInterface.h"
  #include "NodeInterface.h"
  
  #ifndef BINARY_SEARCH_TREE_H
  #define BINARY_SEARCH_TREE_H
  
      struct BTNode :public NodeInterface{
          // Data Fields
          int data;
          BTNode* left;
          BTNode* right;
  
          // Constructor
          BTNode(const int&amp; the_data,
              BTNode* left_val = NULL,
              BTNode* right_val = NULL) :
              data(the_data), left(left_val), right(right_val) {}
  
          // Destructor (to avoid warning message)
          virtual ~BTNode() {}
  
          // Interface Functions
          int getData(){
              return data;
          }
  
          NodeInterface* getLeftChild(){
              return left;
          }
  
          NodeInterface* getRightChild(){
              return right;
          }
  
      }; // End BTNode
  
  
  
  #include &lt;sstream&gt;
  
  template&lt;class T&gt;
  class BinarySearchTree:public BSTInterface
  {
  
  public:
      BTNode* root;
      // BST Constructor / Deconstructor
      BinarySearchTree() : root(NULL){}
  
      //BinarySearchTree(const int&amp; the_data,
      //  const BinarySearchTree&amp; left_child = BinarySearchTree(),
      //  const BinarySearchTree&amp; right_child = BinarySearchTree()) :
      //  root(new BTNode(the_data, left_child.root, right_child.root)){}
  
      virtual ~BinarySearchTree(){}
  
      // Interface Functions ----------------------
  
      NodeInterface* getRootNode(){
          return root;
      }
  
  
      bool add(int data){
          return addRec(root, data);
      }
  
  
      bool addRec(BTNode* &amp;x, int data){
          if (x == NULL){
              if (Search(root, data) == true){
                  return false;
              }
              else{
                  root = GetNewNode(data);
                  return true;
              }
          }
          if (data == x-&gt;data){
              return false;
          }
          if (x != NULL){
              if (data &lt; x-&gt;data){
                  return addRec(x-&gt;left, data);
              }
              if (data &gt; x-&gt;data){
                  return addRec(x-&gt;right, data);
              }
          }
      }
  
  
      bool remove(int data){
          return false;
      }
  
  
      bool removeRec(BTNode* &amp;x, int data){
          return false;
      }
  
  
      void clear(){
  
      }
      // ------------------------------------------
  
  
      // My Functions -----------------------------
  
      BTNode* GetNewNode(int data){
          BTNode* newNode = new BTNode();
          newNode-&gt;data = data;
          newNode-&gt;left = newNode-&gt;right = NULL;
          return newNode;
      }
  
      bool Search(BTNode* root, int data) {
          if (root == NULL) {
              return false;
          }
          else if (root-&gt;data == data) {
              return true;
          }
          else if (data &lt; root-&gt;data) { // had &lt;= instead
              return Search(root-&gt;left, data);
          }
          else if (data &gt; root-&gt;data) { // had no "if"
              return Search(root-&gt;right, data);
          }
      }
      // ------------------------------------------
  };
  #endif
  </code></pre>
  
  <p>Which is derived from the following 2 "Interface" files:</p>
  
  <p>NodeInterface.h:</p>
  
  <pre><code>//YOU MAY NOT MODIFY THIS DOCUMENT    
  #pragma once    
  #include &lt;iostream&gt;    
  class NodeInterface {
  public:
      NodeInterface() {}
      virtual ~NodeInterface() {}
  
      /*Returns the data that is stored in this node*/
      virtual int getData() = 0;
  
      /*Returns the left child of this node or null if it doesn't have one.*/
      virtual NodeInterface * getLeftChild() = 0;
  
      /*Returns the right child of this node or null if it doesn't have one.*/
      virtual NodeInterface * getRightChild() = 0;
  
  };
  </code></pre>
  
  <p>BSTInterface.h</p>
  
  <pre><code>//YOU MAY NOT MODIFY THIS DOCUMENT    
  #pragma once    
  #include "NodeInterface.h"  
  using namespace std;    
  class BSTInterface {
  public:
      BSTInterface() {}
      virtual ~BSTInterface() {}
  
      //Please note that the class that implements this interface must be made
      //of objects which implement the NodeInterface
  
      /*Returns the root node for this tree*/
      virtual NodeInterface * getRootNode() = 0;
  
      /*Attempts to add the given int to the BST tree*/
      virtual bool add(int data) = 0;
  
      /*Attempts to remove the given int from the BST tree*/
      virtual bool remove(int data) = 0;
  
      /*Removes all nodes from the tree, resulting in an empty tree.*/
      virtual void clear() = 0;
  };
  </code></pre>
  
  <p>Then they give us "Factory.h" and "Factory.cpp," which I believe they use to grab our BinarySearchTree from in order to grade using their grading program:</p>
  
  <p>Factory.h:</p>
  
  <pre><code>    #include "BSTInterface.h"
      using namespace std;
      /*
      WARNING: It is expressly forbidden to modify any part of this document, including its name
      */
  
      class Factory
      {
      public:
          static BSTInterface * getBST();
      };     
  </code></pre>
  
  <p>Factory.cpp:</p>
  
  <pre><code>#include "Factory.h"
  #include "BinarySearchTree.h"
  //You may add #include statements here
  
  /*
      You will MODIFY THIS DOCUMENT.
  
      getBST()
      Creates and returns an object whose class extends BSTInterface.
      This should be an object of a class you have created.
      Example: If you made a class called "BinarySearchTree", you might say, "return new BinarySearchTree();".
  */
  BSTInterface * Factory::getBST()
  {
      return new BinarySearchTree();//Modify this line
  }
  </code></pre>
  
  <p>In "Factory.cpp", <code>BinarySearchTree</code> is marked as an error in VS with the message "argument list for class template is missing." How do I fix this? Along with any other errors you see.</p>
  
  <p>Also, how would I declare a new BinarySearchTree object in a <code>main()</code> and call its functions in order to test it?</p>