title: weird iostream compile errors
body: <p>I get these errors when trying to do the following.
  I have a FileMgr class to handle an input and an output file with two member functions to copy each line of input into a list and to write to the output from each member of a list. note: the following functions work properly when handled directly by my main! so don't bother trying to make out what I'm doing with the copy functions, I spent a lot of time figuring them out and now they work fine, the problem is not there.</p>
  
  <pre><code>    FileMgr::FileMgr(string inFilename, string outFilename)
  {
      input.open(inFilename);
      output.open(outFilename);
  }
  
  bool FileMgr::writeFileToList(list&lt;string&gt; &amp;l)
  {
      // copy each line of file into new member of list&lt;string&gt;
      if(!input.is_open())
          return false;
  
      copy(istream_iterator&lt;string&gt;(input), istream_iterator&lt;string&gt;(), back_inserter(l));
  
      return true;
  }
  
  bool FileMgr::writeListToFile(list&lt;string&gt;::iterator begin, list&lt;string&gt;::iterator end)
  {
      // copy each member of list&lt;string&gt; in output file, beginning and ending at iterators begin, end
      // note that I have to pass a "false" end iterator, that is, end--, for it to work
      if(!output.is_open())
          return false;
  
      copy(begin, end, ostream_iterator&lt;string&gt;(output, "\n"));
  
      return true;
  }
  </code></pre>
  
  <p>and up to here everything is fine. then my other class, which gets the list from FileMgr, and it's supposed to let the user edit it (im not there yet because of these errors), so heres part of my declaration:</p>
  
  <pre><code>class Dictionary
  {
  public:
      Dictionary(string inFileName = "dictionary.txt", string outFileName = "output.txt");
      void userEditor();
  //private:
      list&lt;string&gt; dictionary;
      FileMgr manager;
      bool findWord(string word);
      bool addWord(string word);
      bool deleteWord(string word);
      void sortAndFix();
      void saveAndExit();
  </code></pre>
  
  <p>and here's my definitions so far, which is basically just the constructor:</p>
  
  <pre><code>    Dictionary::Dictionary(string inFileName, string outFileName)
  {
      // open files and copy to list; sort and fix list.
      manager = FileMgr(inFileName, outFileName);
  
      dictionary.push_back(" ");
      if( manager.writeFileToList(dictionary) )
          cout &lt;&lt; "File successfully read from " &lt;&lt; inFileName &lt;&lt; endl;
      else
          cout &lt;&lt; "Error in reading " &lt;&lt; inFileName &lt;&lt; endl;
  
      sortAndFix();
  }
  </code></pre>
  
  <p>when I compile, I get these errors somewhere unknown in the constructor just shown (because it's the only code in the file I get these errors from when compiling):</p>
  
  <pre><code>1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\istream(860): error 
  
  C2249: 'std::basic_ios&lt;_Elem,_Traits&gt;::operator =' : no accessible path to private member declared in virtual base 'std::basic_ios&lt;_Elem,_Traits&gt;'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;
  1&gt;          ]
  1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\ios(177) : see declaration of 'std::basic_ios&lt;_Elem,_Traits&gt;::operator ='
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;
  1&gt;          ]
  1&gt;          This diagnostic occurred in the compiler generated function 'std::basic_istream&lt;_Elem,_Traits&gt; &amp;std::basic_istream&lt;_Elem,_Traits&gt;::operator =(const std::basic_istream&lt;_Elem,_Traits&gt; &amp;)'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;
  1&gt;          ]
  1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\ostream(604): error C2249: 'std::basic_ios&lt;_Elem,_Traits&gt;::operator =' : no accessible path to private member declared in virtual base 'std::basic_ios&lt;_Elem,_Traits&gt;'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;
  1&gt;          ]
  1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\ios(177) : see declaration of 'std::basic_ios&lt;_Elem,_Traits&gt;::operator ='
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;
  1&gt;          ]
  1&gt;          This diagnostic occurred in the compiler generated function 'std::basic_ostream&lt;_Elem,_Traits&gt; &amp;std::basic_ostream&lt;_Elem,_Traits&gt;::operator =(const std::basic_ostream&lt;_Elem,_Traits&gt; &amp;)'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;
  1&gt;          ]
  </code></pre>
  
  <p>I can't understand what's wrong. my FileMgr works fine when tested from my main, so why would the compiler trip like that when working with FileMgr from another class??</p>