fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template <class TYPE>
  5. TYPE cmp(TYPE a, TYPE b)
  6. {
  7. return a-b;
  8. }
  9.  
  10. template <class TYPE>
  11. TYPE sort(TYPE(*mcmp)(TYPE,TYPE),int X3)
  12. {
  13. TYPE a, b;
  14. return mcmp(a, b);
  15. }
  16.  
  17. int main() {
  18. std::cout << sort<int>(cmp, 0) << std::endl;
  19. return 0;
  20. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
0