Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- typedef void (*cbType)();
- void call(int, cbType);
- void callback(int*);
- int main()
- {
- call(155, &callback);
- return 0;
- }
- void call(int data, cbType cb)
- {
- printf("Call\r\n");
- cb(&data);
- }
- void callback(int * data)
- {
- printf("Callback\r\n");
- printf("Data: %d\r\n", *data);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement