title: Undefined refrence to function
body: <p>I've been getting frustrated with not knowing why this happen so basically my header file doesnt want to get my function definitions from my cpp file.</p>
  <p>I know the functions work cause I can add them to my header file itself and it works fine but it just wont work from my cpp.</p>
  <p><strong>main.cpp:</strong></p>
  <pre><code> #include &quot;header.h&quot;
  
  using namespace std;
  
  int main()
  {
      StackType&lt;int&gt; myStack;
      
  
      return 0;
  }
  </code></pre>
  <p><strong>header.cpp</strong></p>
  <pre><code>#include &quot;header.h&quot;
  
  using namespace std;
  template&lt;class Type&gt;
  StackType&lt;Type&gt;::StackType() {}
  </code></pre>
  <p><strong>header.h</strong></p>
  <pre><code>using namespace std;
  
  template&lt;class Type&gt;
  class StackType
  {
  public:
  
      StackType();
  
  }
  </code></pre>
  <p>undefined reference to `StackType::StackType()'|</p>