easiest way to read a file line by line?
<p>I have a file like this</p>

<pre><code>Joshua
21
234
5
40.9

jones
14
403
4
39.2
</code></pre>

<p>now I want to know what is the easiest way to tell the compiler to read each line and print it on screen? Please try to answer using the standard c++ libraries and not by creating a custom function. Also please no vectors. So far I have tried this</p>

<pre><code>        ifstream myfile;
        string line;
        do
        {
            cout &lt;&lt; getline(myfile,line);
        }while(!myfile.eof());
        break;
</code></pre>
