reading a file word by word

Posted by nalbina on Stack Overflow See other posts from Stack Overflow or by nalbina
Published on 2010-05-04T18:51:01Z Indexed on 2010/05/04 18:58 UTC
Read the original article Hit count: 161

Filed under:
|

I can read from a file 1 character at a time, but how do i make it go just one word at a time? So, read until there is a space and take that as a string.

This gets me the characters:

while (!fin.eof()){ while (fin>> f ){ F.push_back ( f ); }

© Stack Overflow or respective owner

Related posts about files

Related posts about c++