fork download
  1. #include <stdio.h>
  2. #include <functional>
  3.  
  4. using Callback = std::function<void(int)>;
  5.  
  6. void print() {
  7. printf("Hello\n");
  8. }
  9.  
  10. int main() {
  11. Callback f = std::bind(print);
  12. f(43);
  13. return 0;
  14. }
Success #stdin #stdout 0s 4440KB
stdin
Standard input is empty
stdout
Hello