This method returns a pointer to the first element of an int array
int *getNumbers(){
int *retPtr;
int ret[6];
ret[0] = 1;
ret[1] = 2;
ret[2] = 3;
ret[3] = 4;
ret[4] = 5;
ret[5] = 6;
retPtr = ret;
return retPtr;
}
At this point I can do *(arryPtr + x)
and get the array values out fine
int* arryPtr = getNumbers();
int result = NumberProcess1(arryPtr);
Once I get into this method however I can't do that.
int NumberProcess1(int* numbers)
I keep getting eronious values and I'm not sure why.