array to a function causes strange errors

hi,
I have an array int p[10];
then I pass the value of this array to a function i defined, func(int *point)
in the function, I don't have any sentence to change the value of my array p[10]
but the next time i use p[10], the value is changed


so my question is what did i do wrong?
is that a better way to pass the value of an array to a function?

Thanks a lot
int p[10]

has valid indices 0...9.

sounds like you are attempting to access p[10], which is beyond the end of the array.
Topic archived. No new replies allowed.