I'm trying to read in the first four number from a line similar to the one below, and ignore the rest of the data, then move onto to the next line to repeat...
5 208 1.4 0.7 1 2 97 E 2009
my code so far is
//Creates a stream for our arcs file.
ifstream arcs_file("G:\\Programs\\CPa...........)
for( i = 0; i < amount_of_nodes; ++i)
{
arcs_file>>From[i];
arcs_file>>To[i];
arcs_file>>Minutes[i];
arcs_file>>Miles[i];
arcs_file.seekg(NEXTLINE???);
cout<<From[i]<<" "<<To[i]<<" "<<Minutes[i]<<" "<<Miles[i]<<endl;
}
arcs_file.close();
Where I placed NEXTLINE??? is where I think I can make this work. Any suggestions? maybe I should ues getline? Thank you for the help!