title: Assigning to a two dimensional vector in c++
body: <pre><code>#include&lt;bits/stdc++.h&gt;
  using namespace std;
  main()
  {
      vector&lt;vector&lt;int&gt; &gt; v;
      for(int i = 0;i &lt; 3;i++)
      {
          vector&lt;int&gt; temp;
          for(int j = 0;j &lt; 3;j++)
          {
              temp.push_back(j);
          }
          //cout&lt;&lt;typeid(temp).name()&lt;&lt;endl;
          v[i].push_back(temp);
      }
   }
  </code></pre>
  
  <p>I am trying to assign to a two dimensional vector. I am getting the following error</p>
  
  <pre><code>No matching function for call to 
  std ::vector&lt;int&gt;::push_back(std::vector&lt;int&gt; &amp;)
  </code></pre>