What I expected at the first was that for the second and third person the program Ignores their names , because there is a new line before them and the program will count it as the "line" for the name .
Why is that?
What if I wanted my program to count blank lines in a file?
I even made the blank lines more (for example 10 blank lines between every field of information) and still I had problem.
THank you!
The way >> works is that it ignores all whitespace characters up until the first non-whitespace character and then it tries to read whatever it is you are reading. The newline character is a whitespace character so it will be treated the same way as a normal space or any other whitespace character.