title: output text in .txt file into c++ console
body: <p>I'm new in programming. I had a tcms software which can export all the data into <code>.txt</code> file. I want to output the <code>.txt</code> file on c++ console (exactly the same as in the <code>.txt</code> file) But all I can do is this. Can anyone help me? Here's my code:</p>
  
  <pre><code>#include &lt;iostream&gt; 
  #include &lt;iomanip&gt;
  #include &lt;iomanip&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt;
  #include &lt;stdlib.h&gt;
  
  using namespace std;
  
  int main() {
      string x;
      ifstream inFile;
  
      inFile.open("TEXT1.txt");
      if (!inFile) {
          cout &lt;&lt; "Unable to open file";
          exit(1); // terminate with error
      }
  
      while (inFile &gt;&gt; x) {
          cout &lt;&lt; x &lt;&lt; endl ;
      }
  
      inFile.close();
  }
  </code></pre>
  
  <p>The <code>TEXT1.txt</code> (and the output i desired) is</p>
  
  <pre><code>WLC013   SIN LEI CHADMIN DEPA      0     0.00     0.00    0.00    0.00     2.00
  WLC008   NAI SOO CHADMIN DEPA      0     0.00     0.00    0.00    0.00     2.00
  WLC017   SYLVESTER ADMIN DEPA      0     0.00     0.00    0.00    0.00     2.00
  WLC004   CHANG KUEIADMIN DEPA      0     0.00     0.00    0.00    0.00     2.00
  </code></pre>
  
  <p>But I get output like this</p>
  
  <pre><code>WLC013    
  SIN LEI CHADMIN DEPA         
  0      
  0.00      
  0.00    
  0.00    
  0.00      
  2.00      
  WLC008    
  NAI SOO CHADMIN DEPA        
  ...
  </code></pre>
  
  <p>And is it possible to edit the text file and add in the title for each of the column? 
  Thank you!</p>