Eric Kaplan wrote:
I suppose the following is exact same thing right?
int * const start
int const * start
both means the pointer is constant - (pointer always point to same
address)
No. Those are not the same.
const int* start;
int const* start;
are exactly the same.
int* const start;
start is a constant *pointer* to an int. You can not reseat the poniter.
You can not change where the pointer is pointing to. In fact you better
initialize it since you can't change it. But you can change the integer
that the pointer points to.
int const * start;
start is a pointer to a constant *integer* You can not change the value of
what the pointer points to, but you are free to make the pointer point to
some other memory location.
--
Jim Langston
ta*******@rocketmail.com