fork download
  1. #include <iostream>
  2. #include <functional>
  3.  
  4. using namespace std;
  5.  
  6. void f(int x,int y) {}
  7. // void f(int x) {} // if this line is uncommented, code does not compile.
  8.  
  9. int main() {
  10. auto functor = std::bind(&f,1,placeholders::_1);
  11. cout << "works!" << endl;
  12. // your code goes here
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5500KB
stdin
Standard input is empty
stdout
works!