Passing a 2d vector into a function c++
<p>I have a function (assign) in a class (graph) in a header file. The objective of this function is to print a 2d vector:</p>

<pre><code>class Graph
{
public:
    void printvec(vector&lt; vector&lt;double&gt; &gt;&amp;PRRMap);
};
</code></pre>

<p>I call this function from a cpp file such as:</p>

<pre><code>Graph G;
G.printvec(vector&lt; vector&lt;double&gt; &gt; &amp;PRRmap);
</code></pre>

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

<blockquote>
  <p>error: expected primary-expression before <code>‘&amp;’</code> token</p>
</blockquote>

<p>How can I fix this?</p>
