const pointers
Henry Spencer
henry at utzoo.uucp
Wed Apr 6 07:58:44 AEST 1988
> > ... const on a pointer does not mean that the
> >thing pointed to is constant, just that attempts to modify it through that
> ^^
> >pointer are illegal...
>
> Huh? If by `it' you mean the object pointed to by the const pointer,
> your intepretation seems wrong...
Combination of bad wording on my part and a misunderstanding on yours:
I'm talking about "const foo *", which is the *useful* form of const
pointer, whereas you're thinking of "foo *const".
(Actually, before I get flamed on this, I'll concede that "foo *const"
has uses... small ones, insufficient to justify its addition to the
language in my opinion.)
--
"Noalias must go. This is | Henry Spencer @ U of Toronto Zoology
non-negotiable." --DMR | {allegra,ihnp4,decvax,utai}!utzoo!henry
More information about the Comp.lang.c
mailing list