Typically you want your template methods in the header, so they are compiled when needed. In case you really want to hide it in the implementation file, you have to explicitly instantiate the template in Graph.cpp
like
template class Graph<string>;
Since you have to do that for every type T
you intend to use with Graph<T>
, the point of the template class is somewhat defeated and you better put everything into the header