How can i read first line from file?
<pre><code>ifstream infile;

string read_file_name("test.txt");

infile.open(read_file_name);

string sLine;

    while (!infile.eof())
    {
        getline(infile, sLine);         
        cout &lt;&lt; sLine.data() &lt;&lt; endl;
    }

    infile.close();
</code></pre>

<p>This program prints all line in the file, but I want to print only first line.</p>
