I have this piece of code:
void NeighborsList::insertVertexes(const ifstream & inputFile)
{
int tempS, tempT;
for (int i = 0; i < numOfVertexes; i++)
{
inputFile >> tempS;
inputFile >> tempT;
addEdge(tempS, tempT);
}
}
where I'm trying to get the input for a file. Once I remove the const in the function parameter - (ifstream & inputFile) it works.