Error C2677- binary ">>": no global operator. How to fix those errors?
template<class V, class W>
void Graph<V, W>::GetGraph()
{
edgeRep<V, W> G1;
vertex<V, W> dist;
ifstream input("graph2.txt"), input2("graph3.txt");
string line, line2;
while (!input.eof())
{
input >> line; //C2677
dist.name = line;
AddVertex(dist.name);
input >> line; //C2677
while (line != "#")
{
AddUniEdge(G1.name, G1.weight);
}
}
input.close();
while (!input2.eof())
{
input2 >> line2; //C2677
dist.name = line2;
AddVertex(dist.name);
input2 >> line2; //C2677
while (line2 != "#")
{
AddBiDirEdge(dist.name, G1.name, G1.weight);
}
}
input2.close();
}