Hi Guys ,

If I have a file compouse by words one per line how can I get all the words to put them together and have them separated only by one space. Also how can I make sure I'm extracting only words and not numbers or special character. I thanks.

EPA
(Environmental
Protection
Agency)
and
the
New
York
Water
Pollution
Control
Association
for
outstanding
achievement
and
operation
of
this
important

facility

something like this: note, we are not going to write the program for you.

open the file
do this until end-of-file is reached
    use extraction operator >> to read a word
    check each character  and remove any non-alphabetic characters
          (hint:  isalpha() macro will help you do make that check)
    add the word to a std::string object
end of while loop
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.