title: How get file path from std::ifstream in c++
body: <p>I open a file using <code>std::ifstream</code>.</p>
  
  <p>I may open file using relative path (<code>file.txt</code>) or absolute path (<code>C:\test\file.txt</code>).</p>
  
  <p>As I am passing a string as the file name, I dont know whether it is relative or absolute path.</p>
  
  <p>Can anybody tell me how to get absolute path after file has been successfully open using 
  <code>std::ifstream</code> ?</p>
  
  <p>e.g.:</p>
  
  <pre><code>std::ifstream file(strFile); // strFile is "file.txt" or "C:\test\file.txt"
  </code></pre>
  
  <p>I want to get the absolute path after the file was open successfully.</p>
  
  <p>Thanks,</p>