title: Reading formatted data from file in C++
body: <p>I am trying to write a code to read data from file. The file looks like:</p>
  
  <pre><code>47012   "3101 E 7TH STREET, Parkersburg, WV 26101"
  48964   "S16 W22650 W. LINCOLN AVE, Waukesha, WI 53186"
  .
  .
  .
  .
  </code></pre>
  
  <p>I need to store the number as an int and the address as a string. </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  int main()
  {
  ifstream myfile;
  myfile.open("input.txt");
  long int id;
  string address;
  myfile &gt;&gt; id;
  cout &lt;&lt; id &lt;&lt; endl;
  myfile &gt;&gt; address;
  cout &lt;&lt; address.c_str() &lt;&lt; endl;
  myfile.close();
  system("pause");
  return 0;
  }
  </code></pre>
  
  <p>The output of program </p>
  
  <pre><code>47012
  "3101
  </code></pre>
  
  <p>The output that I need is </p>
  
  <pre><code>47012
  3101 R 7TH STREET, Parkersburg, WV 26101
  </code></pre>
  
  <p>How do I go about doing this. Thanks in advance
  Any help is appreciated</p>