1.

How Do I Declare A Pointer To An Array?

Answer»

Usually, you don't want to. When people speak casually of a pointer to an array, they usually mean a pointer to its first element. Instead of a pointer to an array, consider USING a pointer to ONE of the array's elements. ARRAYS of TYPE T decay into pointers to type T (see question 6.3), which is convenient; subscripting or incrementing the RESULTANT pointer will access the individual members of the array.

Usually, you don't want to. When people speak casually of a pointer to an array, they usually mean a pointer to its first element. Instead of a pointer to an array, consider using a pointer to one of the array's elements. Arrays of type T decay into pointers to type T (see question 6.3), which is convenient; subscripting or incrementing the resultant pointer will access the individual members of the array.



Discussion

No Comment Found