Hmmm, I“ve been trying to get this work but no luck. I have declared a pointer to an int array[5] but when I assign the pointer I get a warning ( differs in levels of indirection from 'int *').
Code:
#include <stdio.h>
#define SIZE 5
int main(void)
{
int array1[SIZE] ={5,4,3,2,1};
int array2[10] = {1,2,3,4,5,6,7,8,9,0};
int (*point) [SIZE];
/* Should work??? */
point = array1;
/* This shouln“t work
point = array2
or does it ??? */
return 0;
}
I just want to create a pointer that can point to an int-array of 5 element, how do i do that???