[sdiy] IN your mind, what is ....
ChristianH
chris at scp.de
Tue Feb 3 16:27:38 CET 2004
not quite, in this case the struct references a function, it does not
contain it. The point is that in
Christian
On Tue, 3 Feb 2004 11:23:21 +0100 (CET) Rainer Buchty wrote:
> > Want an explanation that makes C++ sound good?
> >
> > "C structs that can contain functions".
>
> Uhm... C structs can contain functions, even without ++. How about
> something like this:
>
> typedef struct mc68cmd_s
> {
> char *mask;
> char *mnem;
> char *para;
> int (*callback)(dispc_t *pc, mc68cmd_s *cmd, int datas[], char *str);
> int flags;
> } mc68cmd_t;
>
> People just dislike pointers nowadays :)
>
> Rainer
>
More information about the Synth-diy
mailing list