What's the difference between:
*pointer[10]
and
(*pointer)[10]
and *(pointer[10]) ?
Thanks.
What's the difference between:
*pointer[10]
and
(*pointer)[10]
and *(pointer[10]) ?
Thanks.
*pointer[10] is equivalent to *(pointer[10]), which means "dereference pointer[10]" or "get the object pointed to by pointer[10]". (*pointer)[10] on the other hand, means "gets the 11th element of the array pointed to by pointer".
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)