W
Wei-Chao Hsu
There are some data files look like
1.) data1.txt
----------------
1.0 2.0 3.0
4.0 5.0 6.0
7.0 8.0 9.0
10.0
2.) data2.txt
---------------------
1.0 2.0 3.0 4.0
5.0 6.0 7.0 8.0
9.0 10.0
3.) data3.txt
----------------
1.0 2.0
3.0 4.0 5.0
6.0 7.0
8.0 9.0 10.0
They will be store in a array. A[0]=1.0,A[1]=2.0,.....
I never know the format in each file.
In fortran, I just declare an array A(10), and read them
READ(file_no,*)A
I don't know how to do the same thing in C.
I need your help. Thanks!
Dennis
1.) data1.txt
----------------
1.0 2.0 3.0
4.0 5.0 6.0
7.0 8.0 9.0
10.0
2.) data2.txt
---------------------
1.0 2.0 3.0 4.0
5.0 6.0 7.0 8.0
9.0 10.0
3.) data3.txt
----------------
1.0 2.0
3.0 4.0 5.0
6.0 7.0
8.0 9.0 10.0
They will be store in a array. A[0]=1.0,A[1]=2.0,.....
I never know the format in each file.
In fortran, I just declare an array A(10), and read them
READ(file_no,*)A
I don't know how to do the same thing in C.
I need your help. Thanks!
Dennis