
meaning of const char *const ?
Quote:
> I looked through some source code and saw
> const char *const tst ...
> Whats the meaning of the second const here?
tst is a constant pointer to a constant char.
The first const means the char it's pointing to is constant, so things like:
*tst = 'a'; will not work.
The second const means tst points to a constant place in memory, so things
like: tst = &other_variable; will not work.
HTH,
--
David Scarlett
http://www.listen.to/artifice/
http://members.optushome.com.au/dscarlett/
"Damn it, Kif, where's the little umbrella? That's what makes it a scotch on
the rocks!"
-Capt. Zapp Brannigann, Futurama