master build failure
B.Candler at pobox.com
Thu Feb 21 01:25:08 CET 2013
On Wed, Feb 20, 2013 at 05:38:38PM +0000, Phil Mayers wrote:
> I freely admit to finding const in C confusing.
The most frequently seen example which helps me remember this:
const char *p; // equivalently: char const *p;
Read right-to-left: "p is a pointer to constant char". You can change p
(e.g. p++ is OK) but you cannot change the char which p points to
(*p = '\0' is verboten)
The less common one is
char *const p;
"p is a constant pointer to char". That is, p itself is a constant and
cannot change, but the thing pointed to by p can be changed.
More information about the Freeradius-Devel