L
Linny
Hi,
I need some help in declaring an array of pointers to array of a
certain fixed size. I want the pointers to point to arrays of fixed
size only (should not work for variable sized arrays of the same type).
eg:
int arr1[20];//Array of 20 ints
int arr2[20];
int arr3[20];
............
int arrn[20];
int *arrofptr[10];//Array of 10 pointers to int
arrofptr[0] = arr1[0];
arrofptr[1] = arr2[0];
and so on...
But in this case a user can also point it to an array of a different
size... say
int arr4[30];// Size 30
arrofptr[3]=arr4;
So is there a way to declare the array of pointers so that they point
to arrays of a FIXED size only,without any runtime check on the size of
arrays being pointed to ?
-Linvin
I need some help in declaring an array of pointers to array of a
certain fixed size. I want the pointers to point to arrays of fixed
size only (should not work for variable sized arrays of the same type).
eg:
int arr1[20];//Array of 20 ints
int arr2[20];
int arr3[20];
............
int arrn[20];
int *arrofptr[10];//Array of 10 pointers to int
arrofptr[0] = arr1[0];
arrofptr[1] = arr2[0];
and so on...
But in this case a user can also point it to an array of a different
size... say
int arr4[30];// Size 30
arrofptr[3]=arr4;
So is there a way to declare the array of pointers so that they point
to arrays of a FIXED size only,without any runtime check on the size of
arrays being pointed to ?
-Linvin