I've to make a program with c++ for my thesis that open and extract only two columns from a file .dat that is like this, with a lot of lines:
0.000000 -9.833374 1.000000 0.156921 0.125478 0.350911
5.015625 -9.831743 1.000000 0.157021 0.125752 0.349945
10.015625 -9.838824 1.000000 0.157101 0.125566 0.351512
I've obtained to open and read each lines with the command getline(), but i have no idea of how to extract only the columns that i need (in particular the second and the fourth). I am a very beginner using this programming language, so can somebody give me examples or indications of how to obtain this task?
Thank you very much