Printable View
Quote: Originally Posted by Elysia How do you do it? Passing is easy: func(&function); Declaring a function to take a pointer to a function is less trivial, but something along the lines of: typedef return_type (name)(argument_type argument_name); void foo(name* pFunction); Does that work? I usually see this instead: typedef return_type (*name)(argument_type argument_name); void foo(name pFunction);
Yes, both work, but I tend to use the former because it more visible that it is actually a pointer.