I know that the topic of following a link versus following a pointer is heavily covered ... I pretty much understood all the nuances until I read this:
http://carlo17.home.xs4all.nl/cpp/const.qualifier.html
which reads (in case the link doesn't work)
The prototype for foobar can have any of the following footprints: void foobar(TYPE);
which means the author: "Please note that I put const to the right of TYPE, because we donβt know if TYPE ... is a pointer or not!"
Everything I read on this topic was consistent:
void foodbar (TYPE const &)
also equivalent
void foobar (const TYPE &)
If I understand the author correctly, he / she says that:
const int * X vs int * const X, where is the pointer, is X itself a constant, against which X points to const?
If so, is that true?
Eric
source share