Re^2: Question on const applied to typedef'd pointer
Maarten Litmaath
maart at cs.vu.nl
Wed Mar 1 01:30:10 AEST 1989
gwyn at smoke.BRL.MIL (Doug Gwyn ) writes:
\... -- there can be many levels within
\a type at which "const" could be applied, but the typedef name has
\only two adjacent sides as possible slots for sticking in "const",
\not enough for all the possible levels.
How about applying `const' to the outer level? Seems natural, seems simple.
typedef char *BAR;
typedef BAR *FOO;
`const FOO baz' ->
`const BAR *baz' ->
`const char **baz'
--
"Those who do not understand Henry |Maarten Litmaath @ VU Amsterdam:
Spencer are condemned to reinvent DOS." |maart at cs.vu.nl, mcvax!botter!maart
More information about the Comp.lang.c
mailing list