unqualified-id error before ')' token : <p>I am new to stack overflow and I would appreciate feedback. I am creating a template graph class and have split it into two files graph.h and graph.hpp, but everytime I compile I get this error:</p>

<pre><code>    In file included from graph.h:97:0,
                     from main.cpp:2:
    graph.hpp:4:26: error: expected unqualified-id before ‘)’ token
     typename graph&lt;T&gt;::graph(){
                          ^
makefile:2: recipe for target 'executable.x' failed
</code></pre>

<p>Here is my graph.hpp file so far:</p>

<pre><code>#include "graph.h"

//template &lt;typename T&gt;
typename graph&lt;T&gt;::graph(){
   numVertices = 0;
   graphWeight = 0;
}
</code></pre>

<p>And my graph.h file looks something like:</p>

<pre><code>template &lt;typename T&gt;
class graph{

   public:
      graph();
.
.
.
   private:



};
</code></pre>

<p>Also, my main.cpp is just simply:</p>

<pre><code>#include "graph.h"

int main(){
   graph&lt;int&gt; g;

}
</code></pre>

<p>What could possibly be wrong? I know it's probably something simple that has to do with the template.</p>

<p>Thanks</p>
