fork(1) download
  1. #include <iostream>
  2. #include <functional>
  3.  
  4. using namespace std;
  5.  
  6. double Func(const double *A, int i) {
  7. // 這邊跟本來一樣不用動
  8. return 0;
  9. }
  10.  
  11. void Big(function<double(const double*, int)> Func, const double *A) {
  12. // 把所有出現B[k]的地方 改成Func(A, k)
  13. }
  14.  
  15. int main() {
  16. double A[] = {1, 2, 3, 4};
  17. Big(Func, A);
  18. }
Success #stdin #stdout 0s 2824KB
stdin
Standard input is empty
stdout
Standard output is empty