variables - C what is this line of code doing? Is it casting? -
so i'm following online tutorial (on os development if matters) , saw line of c code void. here's simplified version:
void function1(struct regs *r) { void (*handler)(struct regs *r); // happened here? // things void *handler }
what happened in line? declared variable
void *handler
but did cast? doesnt seem cast. happened there?
void (*handler)(struct regs *r);
declares handler
pointer function expects argument of type struct regs *
, returns type void
.
Comments
Post a Comment