unresolved external symbol - constructor
<p>I have a class <code>graph.h</code> written like this</p>

<pre><code>#include &lt;fstream&gt;
using namespace std;

template &lt;typename T&gt;
class Graph
{
private:
    T ** graphData;
public:
    Graph(ifstream &amp; inputFile);
    ~Graph(){};
    friend ofstream &amp; operator&lt;&lt;(ostream&amp;, const Graph &amp;);
};
</code></pre>

<p>where constructor <code>Graph(ifstream &amp; inputFile);</code> is defined in <code>graph.cpp</code>:</p>

<pre><code>#include "graph.h"  
template &lt;typename T&gt;
Graph&lt;T&gt;::Graph(ifstream &amp; inputFile){}
</code></pre>

<p>I tried to make an instance of this class in main.cpp:</p>

<pre><code>#include &lt;fstream&gt;
#include "graph.h"    
using namespace std;

int main()
{
    ifstream myFile ("example.txt");
    Graph&lt;int&gt; * IntGraph = new Graph&lt;int&gt;(myFile);
    return 0;
}
</code></pre>

<p>but I keep getting these errors</p>

<pre><code>Error   1   error LNK2019: unresolved external symbol "public: __thiscall Graph&lt;int&gt;::Graph&lt;int&gt;(class std::basic_ifstream&lt;char,struct std::char_traits&lt;char&gt; &gt; &amp;)" (??0?$Graph@H@@QAE@AAV?$basic_ifstream@DU?$char_traits@D@std@@@std@@@Z) referenced in function _main    C:\Users\Vlada\Dropbox\FJFI\BP - Graph partitioning\BP-program\BP-program\main.obj  BP-program
Error   2   error LNK1120: 1 unresolved externals   C:\Users\Vlada\Dropbox\FJFI\BP - Graph partitioning\BP-program\Debug\BP-program.exe BP-program
</code></pre>

<p>I tried to search, but none of the result I found seemed to me like this.</p>