Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- typedef void (*func_t)(int x);
- void func(int x){
- std::cout << "evaluate function ";
- }
- func_t f(){
- return &func;
- }
- int x(){
- std::cout << "evaluate arg ";
- return 5;
- }
- int main(){
- while(true){
- f()(x());
- std::cout << std::endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement