how do you make a pointer array? I have an array that i have to make into a pointer array. The program must not change the original array or create any other integer/float arrays???
Please help
how do you make a pointer array? I have an array that i have to make into a pointer array. The program must not change the original array or create any other integer/float arrays???
Please help
You know how to make a pointer?
int *intPtr;
You know how to make an array?
int intArray[SOME_SIZE];
Combine them, and get an array of pointers:
int *ptrArray[SOME_SIZE];
Now you have an array of pointers to integers. Read it in reverse:
[SOME_SIZE] == an array
ptrArray == named 'ptrArray'
* == of pointers
int == of type 'int'
Put it all together: an array of pointers to integers.
Quzah.
Hope is the first step on the road to disappointment.