Hi there,
I am trying to make a piece of code in C that:
1. opens a specified file,
2. Reads the data in the file and separates it into two arrays, based on the position of commas,
3. Converts the strings into doubles and then perfoms some manipulation on them,
4. returns the new values to a second text file.
I can do 1,3 & 4, just can't seem to get point 2 to work. The data I have is in the format:
0.000,1
0.001,2
0.002,4
0.003,1
0.004,5
0.005,3
and I want to end up with two arrays of the form:
a[6] = {0.000,0.001,0.002,0.003,0.004,0.005};
b[6] = {1,2,4,1,5,3};
Any offers?
cheers, Ravenous.