title: How to pass a vector to another vector push back? (without creating a extra variable to pass)
body: <p>Well I am questioning myself if there is a way to pass a vector directly in a parameter, with that I mean, like this:</p>
  
  <pre><code>int xPOS = 5, yPOS = 6, zPOS = 2;
  //^this is actually a struct but 
  //I simplified the code to this
  
  std::vector &lt;std::vector&lt;int&gt;&gt;  NodePoints;
  NodePoints.push_back(
      std::vector&lt;int&gt; {xPOS,yPOS,zPOS}
  );
  </code></pre>
  
  <p>This code ofcourse gives an error; typename not allowed, and expected a ')'</p>
  
  <p>I would have used a struct, but I have to pass the data to a Abstract Virtual Machine where I need to access the node positions as <code>Array[index][index]</code> like:</p>
  
  <pre><code>public GPS_WhenRouteIsCalculated(...)
  {
      for(new i = 0; i &lt; amount_of_nodes; ++i)
      {
          printf("Point(%d)=NodeID(%d), Position(X;Y;Z):{%f;%f;%f}",i,node_id_array[i],NodePosition[i][0],NodePosition[i][1],NodePosition[i][2]); 
      }
      return 1;
  }
  </code></pre>
  
  <p>Ofcourse I could do it like this:</p>
  
  <pre><code>std::vector &lt;std::vector&lt;int&gt;&gt;  NodePoints;//global
  std::vector&lt;int&gt; x;//local
  x.push_back(xPOS);
  x.push_back(yPOS);
  x.push_back(zPOS);
  NodePoints.push_back(x);
  </code></pre>
  
  <p>or this:</p>
  
  <pre><code>std::vector &lt;std::vector&lt;int&gt;&gt;  NodePoints;//global
  std::vector&lt;int&gt; x;//global
  x.push_back(xPOS);
  x.push_back(yPOS);
  x.push_back(zPOS);
  NodePoints.push_back(x);
  x.clear()
  </code></pre>
  
  <p>but then I'm wondering which of the two would be faster/more efficient/better?
  Or is there a way to get my initial code working (first snippet)?</p>