Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdlib.h>
- int num;
- void(**rptr)();
- void foo() {
- if(num >= 100) exit(0);
- std::cout << ++num << std::endl;
- *rptr++ = foo;
- }
- int main() {
- rptr = (void(**)())alloca(sizeof(*rptr) * 200) - 1;
- foo();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement