address of dynamic array
<p>I have this code which returns the address of a dynamic array by pointer .. but how can I return the address of a dynamic array by reference ? thank you..</p>

<pre><code>int* e(int a[][2],int rows)
{
    int *p;

    p=new int[2];

    int max,min;

    max=min=a[0][0];

    int i,j;
    for(i=0;i&lt;rows;i++)
    {
        for(j=0;j&lt;2;j++)
        {
            if(min&gt;a[i][j])
                min=a[i][j];
            else if(max&lt;a[i][j])
                max=a[i][j];
            else;
        }
    }

    p[0]=min;
    p[1]=max;
    delete []p;
    return p;
}
</code></pre>
