title: Creating fstream object from a FILE* pointer
body: <p>The well known way of creating an <strong><code>fstream</code></strong> object is:</p>
  
  <pre><code>ifstream fobj("myfile.txt");
  </code></pre>
  
  <p>ie. using a filename.</p>
  
  <p>But I want to create an ifstream object using a file descriptor.</p>
  
  <blockquote>
    <p><strong>Reason:</strong> I want to execute a command using <code>_popen()</code><strong>.</strong> <code>_popen()</code> returns the output as a <code>FILE*</code>. So there is a FILE* pointer involved but no filename.</p>
  </blockquote>