I am trying to read a file which contains the adjacency list as
1 37 79 164 15
2 123 134 10 141 13
where first number in every line is vertex and following numbers are its adjacent vertices.
This is my code to read from the file . I have been able to put a line in a string but don't know how to proceed to populate the vector.
ifstream ifs;
string line;
ifs.open("kargerMinCut.txt");
std::vector<vector <int> > CadjList(vertices);
while(getline(ifs,line)){
}
Any suggestions ?