Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // To pass one function to another, one might say
- int f(void);
- /* ... */
- g(f);
- // Then the definition of g might read
- void g(int (*funcp)(void))
- {
- /* ... */
- (*funcp)(); /* or funcp(); ... */
- }
- // or, equivalently,
- void g(int func(void))
- {
- /* ... */
- func(); /* or (*func)(); ... */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement