Advertisement
naskedvi

S5 - zad.22

Apr 25th, 2014
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. template<typename Tip>
  5. Tip Nadji(Tip pocetak, Tip iza_kraja, bool (*pok_na_fun)(Tip))
  6. {
  7.   while(pocetak!=iza_kraja)
  8.   {
  9.      if(pok_na_fun(*pocetak)) return pocetak;  // Nadjeno: kraj!
  10.      pocetak++;  
  11.   }
  12.   return iza_kraja;     // Nije nadjeno!
  13. }
  14.  
  15. int main()
  16. {
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement