T
Tony Adams
Hi,
isn't this corretc way to initialize a multi-dimensional array of structs in
C?!?
typedef int (*func)(int);
typedef struct {
int state;
func f;
};
cnt table[2][2] = {
{{CLOSED,&f1},{OPEN,&noop}},
{{ILLEGAL,&illegal},{OPEN,&f2}}
};
(where CLOSED, f1, etc... are defined as ints and funcs.)
TonyA
isn't this corretc way to initialize a multi-dimensional array of structs in
C?!?
typedef int (*func)(int);
typedef struct {
int state;
func f;
};
cnt table[2][2] = {
{{CLOSED,&f1},{OPEN,&noop}},
{{ILLEGAL,&illegal},{OPEN,&f2}}
};
(where CLOSED, f1, etc... are defined as ints and funcs.)
TonyA