Printing an entire text file without showing the blank lines, c++
<p>How can I print and entire text file in c++ without showing the blank lines between entries.
for example I have a text which contains the data below :</p>

<pre><code>ID: 01   FName: Andy   Lname: Garcia 
//this line is left blank
//this line is left blank
//this line is left blank
ID: 02   FName: Brad   Lname: Pitt 
</code></pre>

<p>Now I want to print the entire text file and I usually use while loop for that. But this time I want the program to skip these blank lines. One of the reasons why I want this to happen is that, I have separated the eateries by adding a : "Next" &lt;&lt; endl; , this "Next" appears after each line when the program prints out the file but because there are so many blank line, it also prints so many Next one after another.</p>

<p>I would really appreciate any instructions. Thank you</p>
