error C2664: 'way' : cannot convert parameter 4 from 'int' to 'int &'
<p>I'm having problem with a code.</p>

<p>This is my main.</p>

<pre><code>int main()
{
    cin&gt;&gt;xG&gt;&gt;yG;
    int x,y;
    cin&gt;&gt;x&gt;&gt;y;
    int crrWay[200] = {0},
        minWay[200] = {0},
        minWayN = -1;
    way(x, y, crrWay, 0, 0, minWay, minWayN, 0);
    printWay(minWay, minWayN);
    return 0;
}
</code></pre>

<p>This is the function.</p>

<pre><code>void way(int x, int y, int *crrWay, int&amp; crrWayWeight, int l, int* minWay, int&amp; minWayN, int&amp; minWayWeight)
{
    crrWay[2*l] = x;
    crrWay[2*l+1] = y;

    if( x &lt; 0 || y &lt; 0 || x &gt; 10 || y &gt; 10 )
        return;

    // Сравнява намерения път с минималния
    if(x == xG &amp;&amp; y == xG)
    {
        registerWay(crrWay, l+1, minWay, minWayN, crrWayWeight, minWayWeight);
        return;
    }

    // Клетката е непроходима.
    if(tempMaze[x][y]==0)
        return;
    tempMaze[x][y] = 0;
    crrWayWeight+=maze[x][y];

    // Рекурсивни обръщения към всеки от четирите съседа
    way(x+1, y, crrWay, crrWayWeight, l+1, minWay, minWayN, minWayWeight);
    way(x, y+1, crrWay, crrWayWeight, l+1, minWay, minWayN, minWayWeight);
    way(x-1, y, crrWay, crrWayWeight, l+1, minWay, minWayN, minWayWeight);
    way(x, y-1, crrWay, crrWayWeight, l+1, minWay, minWayN, minWayWeight);

    // връщане назад
    tempMaze[x][y] = 1;
}
</code></pre>

<p>The code can't compile. It says </p>

<blockquote>
  <p>1>c:\users\admin\documents\zad51.cpp(102): error C2664: 'way' : cannot
  convert parameter 4 from 'int' to 'int &amp;'</p>
</blockquote>
