Question: ```
// RecursiveBinarySearch.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#define N 9

int RecursiveBinarySearch(int A, int low, int high, int x);

int main()
{
    int A[N];
    int index = 0;
    //Put 
    A[0] = 2;
    A[1] = 6;
    A[2] = 13;
    A[3] = 21;
    A[4] = 36;
    A[5] = 47;
    A[6] = 63;
    A[7] = 81;
    A[8] = 97;

    printf("Elements in Array A\n");

    while (index <= 8) {
        printf("%d ", A[index]);
        index++;
    }

    printf("\nLocation(index) of element 63\n");

    printf("%d", RecursiveBinarySearch(A, 0, 8, 63));

    return 0;
}

int RecursiveBinarySearch(int A, int low, int high, int x) {

    //Base Condition
    if (low > high)
        return -1;

    int mid = low + (high - low) / 2;

    if (x == A[mid])
        return mid;
    else if (x < A[mid])
        return RecursiveBinarySearch(A, low, mid - 1, x);
    else
        return RecursiveBinarySearch(A, mid + 1, high, x);

}

```

Here's first problem.
Visual studio says 
int A[9]
argument of type "int\*" is incompatible with parameter of type "int"

Here's second problem.
int mid
expression must have pointer-to-object type

I don't know well about pointer so i want to know why this code can't be compiled and how to use pointer in this code.

Answer: 
Better remove all assignements `A[0] = ..., A[1] = ...` alltogether and write:

```
int A[] = {2,6,13,21,36,47,63,81,97}

```

And replace

```
while (index <= 8)

```

by:

```
while (index < sizeof(A)/sizeof(A[0]))

```

`sizeof(A) / sizeof(A[0])` is the number of elements if the array `A`. `sizeof(A)` is the size in bytes of the whole array, and `sizeof(A[0])` is the size of one elements of the array in bytes.

---

But the real problem is here:

Replace:

```
int RecursiveBinarySearch(int A, int low, int high, int x)

```

by

```
int RecursiveBinarySearch(int A[], int low, int high, int x)

```

There may be more errors though.
Start taking compiler warnings seriously:

```
helpPointer.c: In function ‘main’:
helpPointer.c:30:40: warning: passing argument 1 of ‘RecursiveBinarySearch’ makes integer from pointer without a cast [-Wint-conversion]
     printf("%d", RecursiveBinarySearch(A, 0, 8, 63));
                                        ^
helpPointer.c:4:5: note: expected ‘int’ but argument is of type ‘int *’
 int RecursiveBinarySearch(int A, int low, int high, int x);
     ^~~~~~~~~~~~~~~~~~~~~

```

As pointed by people in comments already, you're passing an array into recursive binary search method, so you should change `RecursiveBinarySearch` like this:

```
int RecursiveBinarySearch(int A[], int low, int high, int x);

```

Or 

```
int RecursiveBinarySearch(int *A, int low, int high, int x);

```

Which are one and the same thing, since array name is just a pointer which points to the first element of the array. Read [this](https://stackoverflow.com/questions/1641957/is-an-array-name-a-pointer) if you don't have much idea about relationship between array and pointers.