How to read first numbers from file in C++
I have txt file like this.
51.5u-07
-6.5 -10
55u-10
-7 -10
55u-10
-7 -10
55u-10
-7 -10
54u-10
-7 -10
54.5u-10
-7 -10
55u-10
-7 -10
54.5u-10
-7 -10
55.5u-10
-7.5 -10
I want to read this file, get all odd line's value into vector of int,
vec1. get all even line's value into vector of int, vec2.
such as vec1 is [51.5, 55,55,55,... vec2 is [-6.5, -7, -7, -7...] can
anybody help me this?
Thank you.
No comments:
Post a Comment