No value in vector when trying to display
<p>I'm having some troubles with my current project. I have class of Jobs, which are saved inside <code>vector</code>. When I try to <code>push_back</code> or <code>pop_back</code> job my program works well (I can delete only as many times, as many times I add job).
But when I try to display what is inside my <code>vector</code> I get message: Nothing to display, <code>vector</code> is empty, altought I <code>push_back</code> some jobs.</p>

<pre><code>void Job::generirateActivities(vector&lt;Job&gt; job_list) {

  Smt s1("Default1", 1, 2, 3);
  Smt s2("Default2", 2, 3, 4);

  Date d1(1, 1, 2001);
  Date d2(2, 2, 2002);

  Job j1(&amp;s1, &amp;d1);
  Job j2(&amp;s2, &amp;d2);

  job_list.push_back(a1);
  job_list.push_back(a2); 
}
</code></pre>

<p>And for printing I'm using:</p>

<pre><code>void Job::printJobs(vector&lt;Job&gt; job_list) {
  if (job_list.empty())
    cout &lt;&lt; "Nothing to display, vector is empty." &lt;&lt; endl;
  else {
    for (unsigned int i = 0; i &lt; job_list.size(); i++)
      cout &lt;&lt; i + 1 &lt;&lt; ". " &lt;&lt;job_list[i].toString() &lt;&lt; endl;
  }
</code></pre>

<p>What could be wrong? Any suggestions?</p>

<p>Thanks.</p>