:: Re: [DNG] Making sense of C pointer…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: karl
Date:  
À: dng
Sujet: Re: [DNG] Making sense of C pointer syntax.
Rainer Weikusat:
> karl@??? writes:

...
> > To exemplify the "as they are used" statement, take a function pointer
> > declaration:
> >
> > void (*log_func)(int priority, const char *format);
> >
> > here you cannot conveniently move the "*" to the "void" so it will look
> > like a "pointer" declaration; it declares log_func to be something which
> > if used as (*log_func)(a, b, d) will "give" you a void value.
>
> Unless something more interesting is being done, function pointers don't
> need to be dereferenced, they can be used just like functions.

...

You need it in the declaration, but not in the use, but I didn't want
to confuse the matter.

Regards,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57