Advertisement
Guest User

This is fuckin great

a guest
Nov 24th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <functional>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.   vector<std::function<void()>> funcs;
  10.   auto func = [&](){ printf("Test\n"); };
  11.   funcs.push_back(func);
  12.   funcs[0]();
  13.  
  14.   return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement