You are being too vague, but I'll try to answer.
The function receives a pointer to an integer (int *). C++ variable arrays are a pointer to the first integer, and the rest follow consecutively in memory. Therefore, the declaration:
basically states that p itself is a pointer to the value stored in the first position in the array, or put in code:
The above should assert to true, demonstrating that both point to the same memory address.
Having said all this, how are you accessing the array in your function? Does your function know the size of the array? Is it fixed at 10?
The function cannot change the address of the argument p, but can change the values it points to. The following will change the values of the array:
1 2 3 4 5 6
|
func(int * point)
{
...
point[0] = 1;
...
}
|
Finally, a common newbie mistake is trying to compare a value using just one "=" sign instead of two:
1 2 3 4 5 6
|
func(int * point)
{
...
if (point[0] = 1)
...
}
|
The above is not a comparison. It will always be true because point[0] is being assigned a value of 1, and if(1) is always true. There should be two "=" signs in the comparison, not 1.