Hey all~

I am writing a function which takes an array as parameter and returns the pointer to the part of the array which had not yet been written with negative values. In the beginning I had initialised the entire array with a positive value. So now my function looks like this but apparently it doesn't work:

Code:
int * myfunction(int *array, int size){	int i = 0;
	while(array[i] < 0) i++;
	int *pointer = array[i];
	return pointer;
}
any help to make this work?

Thanks in advance~