Reading colums of data

Hello guys, I am a noob in C++ more over on Ubuntu. I need your help pleaseeee!!! I have this data and will like to read the columns under ca, cw and alpha. How do I do that?
Here is my file looks like:

GU 25-5(II)8
Datum: 24.10.75
Re : 0.70E+06
Beta : 0.0
ca cw alfa ca
0.26 0.0149 -5.5 0.09
0.34 0.0146 -1.8 0.48
0.37 0.0142 2.1 0.92
0.39 0.0135 7.0 1.43
0.51 0.0129 11.4 1.88
0.63 0.0116 12.1 1.89
0.69 0.0113 14.0 1.65
0.89 0.0117 16.2 1.54
1.08 0.0128 18.3 1.48
1.26 0.0133 0.0 0.00
1.42 0.0143 0.0 0.00
1.67 0.0154 0.0 0.00
1.72 0.0158 0.0 0.00
1.77 0.0164 0.0 0.00
1.86 0.0167 0.0 0.00
1.89 0.0170 0.0 0.00
1.85 0.0187 0.0 0.00
Help please.
1
2
3
4
5
6
std::ifstream is("filename");
while (is)
{
    double ca, cw, alfa, ca;
    is >> ca >> cw >> alfa >> ca;
}
Last edited on
Topic archived. No new replies allowed.