fork(6) download
  1. #include <iostream>
  2. #include <set>
  3. using namespace std;
  4.  
  5. struct struktura
  6. {
  7. set<int, bool(*)(int, int)>
  8. remaining([](int a, int b)->bool
  9. {return a < b;});
  10. };
  11.  
  12. int main() {}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:8:15: error: expected identifier before '[' token
     remaining([](int a, int b)->bool
               ^
prog.cpp:8:33: error: creating array of functions
     remaining([](int a, int b)->bool
                                 ^
prog.cpp:9:7: error: expected ')' before '{' token
       {return a < b;});
       ^
prog.cpp:9:22: error: expected unqualified-id before ')' token
       {return a < b;});
                      ^
prog.cpp: In member function 'std::set<int, bool (*)(int, int)> struktura::remaining()':
prog.cpp:9:15: error: 'a' was not declared in this scope
       {return a < b;});
               ^
prog.cpp:9:19: error: 'b' was not declared in this scope
       {return a < b;});
                   ^
stdout
Standard output is empty