title: Why am I getting this ifstream error?
body: <p><code>Implicit instantiation of undefined template 'std::basic_ifstream&lt;char,std::char_traits&lt;char&gt;&gt;'</code></p>
  
  <hr>
  
  <pre><code>#ifndef MAPPER_H
  #define MAPPER_H
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include "KeyValue.h"
  #include "Parser.h"
  
  using namespace std;
  class Mapper
  {
  public:
      Mapper(ifstream&amp; infile);
      ~Mapper(void);
      void loadTokens();
      void showTokens();
      void map();
      void printMap();
      void printMap(string map_fileName);
  private:
      ifstream inFile;  //&lt;-- is where the error is happening
      vector&lt;string&gt; tokens;
      vector&lt;KeyValue&gt; map_output;
      Parser* parser;
  };
  
  #endif
  </code></pre>
  
  <p>I've even tried putting <code>std::ifstream</code> and it still doesn't work.</p>
  
  <p>When I <code>#include &lt;fstream&gt;</code> instead of <code>#include &lt;iostream&gt;</code>, I get these errors in <code>fstream.tcc</code> and <code>basic_ios.tcc</code>:</p>
  
  <p><code>'operator=' is a private member of 'std::basic_streambuf&lt;char&gt;'</code></p>
  
  <p>And since that's part of the fstream library, obviously something i'm doing is wrong...</p>
  
  <p>Anyone able to help?</p>