title: Use of undeclared identifier in header file (Clang)
body: <p>I am creating a function to read the contents of a file, located in an IO.cpp file:</p>
  
  <pre><code>#include "IO.h"
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  IO::IO()
  {
      //ctor
  }
  
  void IO::readFile(std::string fileName)
  {
      std::ofstream inputFile;
      inputFile.open(FileName);
      inputFile &gt;&gt; fileName.toStdString;
      inputFile.close();
      std::cout &lt;&lt; fileName;
  }
  </code></pre>
  
  <p>With the header file IO.h:</p>
  
  <pre><code>#ifndef IO_H
  #define IO_H
  
  
  class IO
  {
      public:
          IO();
          void readFile(std::string inputFile);
      protected:
      private:
  };
  
  #endif // IO_H
  </code></pre>
  
  <p>But I get an error from Clang that says</p>
  
  <blockquote>
    <p>include/IO.h|9|error: use of undeclared identifier 'std'|</p>
  </blockquote>
  
  <p>And I can't figure out how to solve it.</p>