Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Example program
- #include <iostream>
- #include <string>
- void (*foo)(int);
- void foo_real(int n)
- {
- n = 50;
- std::cout << "Hello PICKLES" << n;
- }
- void CallAFunc(void(*func)(int))
- {
- func(50);
- }
- int main()
- {
- foo = foo_real;
- CallAFunc(foo);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement