title: Unable to create instance of a class with empty constructor
body: <p>I have written the following code for Set class in C++. The issue I am facing is <br>
  When I am doing  <code>Set *set = new Set();</code> in the main method. It's showing the error - <br>
  <code>argument list for class template &quot;Set&quot; is missingC/C++(441)</code> <br>
  That means it's looking for the constructor with arguments. Even though a constructor without<br>
  argument is specified. What could be the reason for this ?</p>
  <p>The other error I am getting is at <code>template &lt;class ItemType&gt; Node&lt;ItemType&gt; *Set&lt;ItemType&gt;:: getPointerTo(const ItemType &amp;target) const</code> line.<br>
  Error : <code>declaration is incompatible with</code><br>
  This can be seen as declared in the Set class inside private. Although it's declared exactly the <br>
  same in the Set class and the implementation class. I am not sure why it's throwing that error
  <br></p>
  <pre><code>    #include &quot;Set.h&quot;
          #include &quot;Node.h&quot;
          
      template &lt;class ItemType&gt;
      Set&lt;ItemType&gt;::Set() : headPtr(nullptr), itemCount(0)
      {
      } // end default constructor
      
      template &lt;class ItemType&gt;
      Set&lt;ItemType&gt;::Set(const Set&lt;ItemType&gt; &amp;item)
      {
          itemCount = item-&gt;itemCount;
          Node&lt;ItemType&gt; *origChainPtr = item-&gt;headPtr if (origChainPtr == nullptr)
                                             headPtr = nullptr; // Original bag is empty; so is copy
          
      } // end copy constructor
  
  template &lt;class ItemType&gt;
  Node&lt;ItemType&gt; *Set&lt;ItemType&gt;::
      getPointerTo(const ItemType &amp;target) const
  {
      bool found = false;
      Node&lt;ItemType&gt; *curPtr = headPtr;
      while (!found &amp;&amp; (curPtr != nullptr))
      {
          if (target == curPtr-&gt;getItem())
              found = true;
          else
              curPtr = curPtr-&gt;getNext();
      } // end while
      return curPtr;
  } // end getPointerT
  </code></pre>
  <pre><code>template &lt;class ItemType&gt;
  class Set : public SetInterface&lt;ItemType&gt;
  {
  private:
      Node&lt;ItemType&gt; *headPtr;
      int itemCount;
      Node&lt;ItemType&gt; *getPointerTo(const ItemType &amp;target) const;
  
  public:
      Set();
      Set(const Set&lt;ItemType&gt; &amp;item); // Copy constructor
  };                                  // end LinkedBag
  </code></pre>
  <pre><code>#include &lt;iostream&gt;
      #include &quot;Set.h&quot;
      using namespace std;
      
      int main()
      {
      
          Set *set = new Set();
          return 0;
      }
  </code></pre>