fork download
  1. #include <functional>
  2.  
  3. int f(int i) {
  4. return i;
  5. }
  6.  
  7. int main()
  8. {
  9. std::function<int(int)> func = &f;
  10.  
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:9: error: ‘function’ is not a member of ‘std’
prog.cpp:9: error: expected primary-expression before ‘int’
prog.cpp:9: error: expected `;' before ‘int’
stdout
Standard output is empty