|
Yes the first thing that popped in my mind as well. But if you look around on this forum you'll see peeps having difficulties with stream handling. Once their fight against basic C++ is over they can shift their attention.
If I stored the words in a container they would not have learned how to count lines and wouldn't have seen that one needs to parse all lines to count the total lines in file. It's the only portable way.
__________________
|