fork download
  1. template <
  2. typename funct
  3. >
  4. double find_min (
  5. const funct& f
  6. )
  7. { return 0.0; }
  8.  
  9. class ABC {
  10. public:
  11. void run(double (*function_ptr)(double))
  12. {
  13. find_min((*function_ptr));
  14. }
  15. };
  16.  
  17. double my_func(double) { return 1.0; }
  18.  
  19. int main()
  20. {
  21. ABC abc;
  22. abc.run(my_func);
  23. }
  24.  
Success #stdin #stdout 0.01s 2720KB
stdin
Standard input is empty
stdout
Standard output is empty