auto_ptr question in c++
<p>all
I am new here.
I am also new on C++
So here is the class and function i wrote.But i got the compiler error
My class:</p>

<pre><code>class fooPlayer
{
public:
       void fooPlayerfunc(){}//doing something here
       char askYesNo(std::string question);
};

class fooPlayerFactory
{
public:
   virtual std::auto_ptr&lt;fooPlayer&gt; MakePlayerX() const;
   virtual std::auto_ptr&lt;fooPlayer&gt; MakePlayerO() const;
private:
   std::auto_ptr&lt;fooPlayer&gt; MakePlayer(char letter) const;
   std::auto_ptr&lt;fooPlayer&gt; my_player;

};
</code></pre>

<p>Implement my class:</p>

<pre><code>auto_ptr&lt;fooPlayer&gt; fooPlayerFactory:: MakePlayer(char letter) const
{
       my_player-&gt;fooPlayerfunc();
       return my_player;
}

auto_ptr&lt;fooPlayer&gt; fooPlayerFactory::MakePlayerX() const
{
      char go_first = my_player-&gt;askYesNo("Do you require the first move?");
      MakePlayer(go_first);
      return my_player;
}

auto_ptr&lt;fooPlayer&gt; fooPlayerFactory::MakePlayerO() const
{
    return my_player;
}
</code></pre>

<p>My main() function here:</p>

<pre><code>int main()
{
       fooPlayerFactory factory;
       factory.MakePlayerX();
       factory.MakePlayerO();
}
</code></pre>

<p>I got the error:
error C2558: class 'std::auto_ptr&lt;_Ty>' : no copy constructor available or copy constructor is declared 'explicit'</p>

<p>I do not know how to change it even after reading the document on <a href="http://msdn.microsoft.com/en-us/library/7xcz0y39%28VS.71%29.aspx" rel="nofollow">this</a> link:</p>
