I need clarification for the following notation in C:
I have a struct, and within that struct I have the following field:
bool (* process_builtin)(struct esh_command *);
I am pretty confused here.. So this is a boolean field.. What exactly is process_builtin? I already have a struct esh_command defined, but I have no clue where this plays in this field. Can someone please explain the whole thing’s meaning?
That’s not a boolean field, that’s a pointer to a function taking a
struct esh_command*and returning abool; the field is calledprocess_builtin.You could also write:
in which case
process_builtin_twould be a type and in which case you could write the definition of thatstructmember as: