Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   How to take different types of data from a text file to an array(2-D) using pointer (http://www.go4expert.com/forums/types-data-text-file-array-2-d-using-t28077/)

Ani801 23Mar2012 15:10

How to take different types of data from a text file to an array(2-D) using pointer
 
I have a text file containing a schedule like below-

B - (2,3) (5,7) (10,12)
C - (7,8) (11,12)
G - (5,6) (10,11)
F - (1,2) (4,6) (9,11)

Please help me, how I can take the above data from that text file (suppose "a.txt") to an array(2-D) in a C-program using pointer

priyatendulkar 27Mar2012 13:21

Re: How to take different types of data from a text file to an array(2-D) using point
 
hi,

Jst need some info..
As per your req..You will have 4 (2-D ) arrays

B , C, G, F ..Is it so or Have I misinterpreted your question

Ani801 27Mar2012 15:04

Re: How to take different types of data from a text file to an array(2-D) using point
 
Mainly, I have to take the data- "B 2 3 5 7 10 12 C 7 8 11 12 G 5 6 10 11 F 1 2 4 6 9 11" from text file containing - " B - (2,3) (5,7) (10,12)
C - (7,8) (11,12)
G - (5,6) (10,11)
F - (1,2) (4,6) (9,11) "
using pointer


All times are GMT +5.5. The time now is 21:24.