Hi there,
I need to make a piece of code in C that
1. opens a specified file,
2. Reads the data in the file and separates it as shown below,
3. Converts the strings into integers and then perfoms some manipulation on them,
4. returns the new values to a second text file (possibly, not quite sure on this one yet).
My data is given in the following format (there is one space between a1 and b1, b1 and c1, etc.):
x
y
a1 b1 c1 d1 e1 f1
a2 b2 c2 d2 e2 f2
while not EOF
I would like to read in data in the following format for further processing:
x
y
a b c d e f
a[i+1] b[i+1] c[i+1] d[i+1] e[i+1] f[i+1]
I guess I need to read it in as an array and then do some sort of concatenation/speration (my inputs can be one or two digits, i.e. a can be 0 or 99). This is probably not very difficult, but I haven't touched C in about 6-7 years. It must be done in C (no C++ or C#). I tried to search, but couldn't find my case (maybe it was posted before and I just did not see it).
Please give me some hints. Timewise, I should be able to have it working ASAP.
Thank You very much.