Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1287

Answer by HolyBlackCat for Why double pointer has a type

$
0
0

Pointers-to-pointers are not special in this regard. The answer for them is the same as for any other pointers:

  • It tells the compiler how to interpret the pointed value, when you dereference the pointer.

    (When you do **p, how many bytes should we read/write from the address stored at *p? And how should those bytes be interpreted?)

  • It adds some type safety - you can't convert to and from a pointer to a different type without a cast.


Viewing all articles
Browse latest Browse all 1287

Trending Articles