C++ Vector of class objects
<p>I have a class called Movie with the following private data members:</p>

<pre><code>private:
    string       title_ ;  
    string       director_ ;  
    Movie_Rating rating_ ;  
    unsigned int year_ ;  
    string       url_ ;  
    vector&lt;string&gt; actor_;
</code></pre>

<p>It also contains the following copy constructor:</p>

<pre><code>Movie::Movie(Movie&amp; myMovie)  
{  
    title_ = myMovie.title_;  
    director_ = myMovie.director_;  
    rating_ = myMovie.rating_;  
    year_ = myMovie.year_;  
    url_ = myMovie.url_;  
    actor_ = myMovie.actor_;  
}
</code></pre>

<p>When I try to create a vector of this class,</p>

<pre><code>vector&lt;Movie&gt; myMovies;
</code></pre>

<p>and then accept all the info from a user into a temp <code>Movie</code> object (<code>myMovie1</code>), and then use push back:</p>

<pre><code>myMovies.push_back(myMovie1);
</code></pre>

<p>I get the following error:</p>

<pre><code>1&gt;c:\program files (x86)\microsoft visual studio 9.0\vc\include\vector(1233) : error C2558: class 'Movie' : no copy constructor available or copy constructor is declared 'explicit'
</code></pre>

<p>Where am I going wrong? It seems it wants a copy constructor but I do have one defined.</p>
