title: How to get error message when ifstream open fails
body: <pre><code>ifstream f;
  f.open(fileName);
  
  if ( f.fail() )
  {
      // I need error message here, like "File not found" etc. -
      // the reason of the failure
  }
  </code></pre>
  
  <p>How to get error message as string?</p>