Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Reading words from a text file (http://www.go4expert.com/forums/reading-words-text-file-t1669/)

wvueagle 18Oct2006 21:18

Reading words from a text file
 
I need help with reading in text from a file. My final goal is to read in a text file and place each word of the text file into a linked list using dynamic memory (because the size of the file and words will vary between each). I have already decided on using a queue, because I will need to read back off each element in a first in first out manner, but I can not test anything/get any further until I can read in the file. I have tried a few things and the best I can get is the first word of each line. I haven’t used C for a while but for this case I need to get “down and dirty” and use C and am stuck at this point. Thanks for any help!

shabbir 19Oct2006 10:02

Re: Reading words from a text file
 
You are getting the first word because its delimited by space. Put the code here and we can have a look and help you out.


All times are GMT +5.5. The time now is 02:31.