I have a piece of C code and don't understand what happens here:
typedef int (*ptr) (void *ptr2, const char *name);
What I do understand is the typedef int (*ptr) part, but what happens in the second()? I've seen some questions where it was the other way around: typedef void (*ptr) (int), is this similar or different (and how)? I'm not the best at C, so I thought maybe *ptr now points to a function where *ptr2 and *name are declared or *ptr now points to *ptr2 and *name?
It would be great if someone could explain this to me. Thanks in advance!