Click here to Skip to main content
14,603,917 members
Rate this:
Please Sign up or sign in to vote.
See more:
That read a text file and then extract it's words and store them in another text file each words in a separates line.
Posted
Comments
Sauro Viti 14-Oct-10 4:45am
   
No effort
Rate this:
Please Sign up or sign in to vote.

Solution 1

Take a look at istream[^], ostream and string. It should not take too long to work it out.
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

Well, the task is fairly simple:
  • Read the input file.
  • Match every word (seach for 'separators', i.e. spaces,tabs, etc).
  • Write every word plus a newline to the output file.


What is your doubt about?
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

You have already posted exactly the same question just with the tag C# instead than C++ (see Help Please in the read text file[^]): I think you have to ask yourself what do you want to do
   
Comments
Richard MacCutchan 14-Oct-10 5:47am
   
OP doesn't want to do anything, expects us to do it for him/her.
Sauro Viti 14-Oct-10 6:49am
   
Yes, this is his problem... pheraps he had choosen the wrong work...
noor qudah 14-Oct-10 7:25am
   
I'm sorry, but I was asked the question did not specify the programming language

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100