In message <[email protected]>
          Alex Macfarlane Smith <[email protected]> wrote:

> Theo Markettos wrote:
> > On Sat, Dec 06, 2008 at 04:20:45PM +0200, John Tytgat wrote:
> >> In message <[email protected]>
> >>           Theo Markettos <[email protected]> wrote:
> >>
> >>> +  while ((grp = getgrent ()) !=NULL)
> >>> +    {
> >>> +      char **mem;
> >> const char ** would be slightly better.
> > 
> > That doesn't work, because we have to modify the value of mem.
> 
> I thought const char ** meant a pointer to a pointer to a const char, so 
> that doesn't negate the possibility of changing mem.
> 
> I think char * const * mem; would be that...
> 
> Or I may be talking gibberish :)

You're right Alex and actually I had the same first reaction but what Theo
probably meant was that with "const char **mem" you'll end up with a 
warning for 'incompatible pointer' when you assign mem with a 'char **'
value.  So it wasn't a good suggestion after all.

John.
-- 
John Tytgat, in his comfy chair at home                                 BASS
[email protected]                             ARM powered, RISC OS driven

_______________________________________________
GCCSDK mailing list [email protected]
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

Reply via email to