![]() |
| | #1 |
| Registered User Join Date: Jun 2008
Posts: 1
| I need some help reading data from this text file and storing them appropriatly: example: Mike 19 Male Newyork student Pamela 24 Female Chicago doctor .... the first column is for names, the second is for age, the third is for gender ,the fourth is for city and the fifth is for occupation. I need to store each one in an appropriate array. N.B the space between each field(values) is a \t And sorry for not providing any code simply because i couldn't do it ![]() Thanks in advance. |
| inspiro is offline | |
| | #2 |
| and the Hat of Guessing Join Date: Nov 2007
Posts: 8,740
| You have formatted input. So you should use a formatted input function. Read up on *scanf, and "strings" in general. |
| tabstop is offline | |
| | #3 | |
| Registered User Join Date: Sep 2006
Posts: 2,512
| Quote:
You post up your code, and tell us what the problem is with it, and we'll be glad to help. Help, but not do it for you. | |
| Adak is offline | |
![]() |
| Tags |
| batch, i/o, read data, text file |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading output into a text file | pete212 | C Programming | 8 | 04-23-2008 05:11 PM |
| Reading Character at a time from a text file | Giania | C Programming | 8 | 02-25-2006 03:17 PM |
| Reading text file twice, can it be done once? | CaeZaR | C++ Programming | 4 | 02-04-2006 04:18 PM |
| How to use FTP? | maxorator | C++ Programming | 8 | 11-04-2005 03:17 PM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C Programming | 3 | 03-04-2005 02:46 PM |