title: problem passing in istream argument to a class constructor
body: <p>I have the following code in my header file:</p>
  
  <pre><code>class Factovisors {
  
      public:
          Factovisors(std::istream&amp; strm):strm_(strm)
          {
  
          }
          void run()
          {
              unsigned int n,m;
              while (!strm_.eof()) {
              strm_ &gt;&gt; n &gt;&gt; m;
  
              if (isFact(n,m))
                  std::cout &lt;&lt; m &lt;&lt; " divides " &lt;&lt; n &lt;&lt; "!\n";
              }
          }
  
          std::istream strm_;
  
  };
  </code></pre>
  
  <p>My .cpp file has the following code.</p>
  
  <pre><code> std::ifstream strm("factovisor.test");
  
      Factovisors   facto(strm);
  
      facto.run();
  
      strm.close();
  </code></pre>
  
  <p>The error my compiler gives me is:</p>
  
  <pre><code>std::ios::basic_ios(const std::ios &amp;) is not accessible from
  std::istream::basic_istream(const std::istream &amp;)
  </code></pre>
  
  <p>I imagine I am missing something really obvious. So any help would be greatly appreciated.</p>