Read from a .dat file made of strings of numbers

Hi everybody!
I am a very beginner in language c++. I am doing a thesis and i have to elaborate some experimentals data.
In particular i have to make a program that open and read a file .dat in which there are a lot of lines organized in different columns, like these:

0.000000 -9.904166 22.413387 1.000000 0.083073
5.000000 -9.899996 22.414845 1.000000 0.083184
10.000000 -9.903506 22.413485 1.000000 0.083142

Once open and read, i have to extraxt, line by line, only the second and fifth column and calculate the mean and standard deviation.

So, somebody has an idea about how to realize this program with c++?

Thank you very much

Last edited on
Topic archived. No new replies allowed.