Reading text file and storing columns in an array
问题 I have file that looks like this: 01 01 5.00 1.50 7.50 02 01 4.00 3.00 12.00 02 02 3.00 4.00 12.00 03 01 4.50 3.00 13.50 03 01 7.50 2.50 18.75 03 01 6.00 0.50 3.00 04 01 2.00 3.00 6.00 04 02 2.00 3.00 6.00 05 01 1.50 3.00 4.50 07 01 5.00 1.00 5.00 09 01 1.50 6.00 9.00 I am trying to read each line and store each column of data into separate arrays. Something like this: int A[100] = {1, 2, 2, 3, 3, 3, 4, 4, 5, 7, 9} int B[100] = {1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1} double C[100] = {5.00, 4.00, 3