fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. typedef int (*function_type)(int, int);
  5.  
  6. void applier(int* array, int size, function_type functor, int parameter)
  7. {
  8. if (array == 0 || size <= 0 || functor == 0) {
  9. return;
  10. }
  11. for (int i = 0; i < size; ++i) {
  12. array[i] = functor(array[i], parameter);
  13. }
  14. }
  15.  
  16.  
  17. int main() {
  18. // your code goes here
  19. return 0;
  20. }
Success #stdin #stdout 0s 3092KB
stdin
Standard input is empty
stdout
Standard output is empty