Advertisement
avr39-ripe

copy_ifTask

Apr 6th, 2020
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. template <typename T>
  4. bool trueer(const T& el) { return true; }
  5. template <typename T>
  6. bool falseer(const T& el) { return false; }
  7.  
  8. template <typename T>
  9. int copy_if(T* srcB, T* srcE, T* destB, T* destE, bool(*pred)(const T& el))
  10. {
  11.  
  12. }
  13.  
  14. int main()
  15. {
  16.     const int arrSize{ 10 };
  17.     int arr[arrSize]{ 1,2,3,4,5,6,7,8,9,10 };
  18.     int* arrBegin{ arr };
  19.     int* arrEnd{ arr + arrSize };
  20.  
  21.     const int arr1Size{ 10 };
  22.     int arr1[arr1Size]{};
  23.     int* arr1Begin{ arr1 };
  24.     int* arr1End{ arr1 + arr1Size };
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement