QuickSort in C++ array.size() error : <p>I'm writing some code in C++ to do the quick sort algorithm to sort an array of integers. I have my complete code here:</p>

<pre><code>void swap(int A[], int x, int y)
{
    int tmp;
    tmp=A[x];
    A[x]=A[y];
    A[y]=tmp;
}

int partition(int A[], int start, int stop)
{
    int big=start;
    int pivot=A[stop];
    for(int i=start; i&lt;stop; i++)
    {
        if(A[i]&lt;=pivot)
        {
            swap(A, i, big);
            big++;
        }
    }
    swap(A, big, stop);
    return big;
}


void quick_Sort_Helper(int A[], int start, int stop)
{
    //base cases
    if(stop&lt;=start)
    {return;}

    if(start+1==stop)
{
    if(A[start]&gt;A[stop])
    {swap(A, start, stop);}
    return;
}

//recursive cases
int pivot=partition(A,start, stop);
quick_Sort_Helper(A,start, pivot-1);
quick_Sort_Helper(A, pivot, stop);
}

void quick_Sort(int A[])
{
    quick_Sort_Helper(A,0, A.size()-1);
}
</code></pre>

<p>I get an error when compiling the program on the line where I call A.size(). The error reads as follows:</p>

<p>error: request for member ‘size’ in ‘A’, which is of non-class      type ‘int*’</p>

<p>I don't understand because the size() function of an array is supposed to return an integer with the length/ number of elements in the array.</p>
