Vertex getVertexbyId(std::string id,Graph g){
 

It probably has something to do with the fact that you're making a copy of the graph. Change "Graph g" to "const Graph& g".
 
Andrew Sutton
andrew.n.sutton@gmail.com