title: C++ Error when adding objects to vector
body: <p>I'm new with vectors. I'm trying to add objects to a vector. But the program can't compile because I have a problem in the code. But I don't know what is it. The error is:</p>
  
  <pre><code>error C2664: 'void std::vector&lt;_Ty&gt;::push_back(_Ty &amp;&amp;)' : cannot convert parameter 1 from 'Line (void)' to 'Line &amp;&amp;'
  </code></pre>
  
  <p>The code is:</p>
  
  <pre><code>Line help_line ();
  cin &gt;&gt; ln_quan;
  vector &lt;Line&gt; figure_line;
  for (int i = 0 ; i &lt; ln_quan ; i++)
  {
      figure_line.push_back(help_line);
  }
  </code></pre>
  
  <p>The compiler says that the error is at the 6-th line (figure_line.push_back(help_line);).</p>
  
  <p>I gave up trying to find a tutorial explaining how to add objects (I give up easily when doing such things...).</p>
  
  <p>And what does 'Line (void)' and 'Line &amp;&amp;' mean? Is 'Line (void)' the class 'Line'? If so, what does '(void)' mean in this case?</p>