title: How to Access File Descriptor of Open File
body: <p>Is there any way to access the file descriptor of a file opened in c++?  So ...</p>
  
  <pre><code> #include &lt;iostream&gt;
   #include &lt;fstream&gt;
   using namespace std;
  
   int main() {
        ifstream inputFile( "file.txt",ios::in );
        cout &lt;&lt; inputFile.fileDesc &lt;&lt; endl;//made up call
        return 0;
   }
  </code></pre>
  
  <p>The question is, does something like fileDesc exist for ifstreams?  If not how would I go about doing this?</p>