title: C++ reading file line by line
body: <p>There is a text file I want to display, but I only get the first line, not sure how to do this:</p>
  
  <pre><code>string line;
  ifstream myfile;
  myfile.open("myfile.txt");
  getline(myfile, line); 
  cout &lt;&lt; line &lt;&lt; endl;
  </code></pre>