There are lots of newlines in the file. Each line ends with a newline character. The blank line is a place where there are two consecutive newline characters.
But still, I'd look a the question differently. Use getline() to read a line at a time. The blank line means the length of the line is zero.