Can someone please link me to the GCC explanation of its different usages of the "const" keyword. I remember reading the page a while ago (I think it might have been from opengroup.org) where it clearly laid out a 2-dimensional table explaining the different usages of the const keyword and what its effect was. It looked something like this:
__________ | category 1 | category 2 |
-----------------------------------------------------------
const char* | explanation 1 | explanation 2 |
char const* | explanation 3 | explanation 4 |
char *const | explanation 5 | explanation 6 |
-----------------------------------------------------------
From what I can gather , the first denotes a pointer to a constant char (its memory contants cannot change); the second is a synonym of the first; and the third is a constant pointer (its reference cannot change to point elsewhere).
If I could just find that page (or another equally in-depth explanation).. it was just so much more technically accurate.
Thanks.
p.s. here are some other useful explanations:
http://cprogramming.com/tutorial/const_correctness.html
http://en.wikipedia.org/wiki/Const_correctness:(that was actually suprisingly, concisely helpful)everything to the left of the star can be identified as the pointee type and everything to the right of the star are the pointer properties.