Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. bool filter(char z, char * filtr)
  2. {
  3. while(*filtr!='\0')
  4. {
  5. if(*filtr == z)
  6. return true;
  7.  
  8. filtr++;
  9. }
  10. return false;
  11. }
  12. int kopiujZFiltrowaniem(char * d, char * z, char * filtr )
  13. {
  14. int liczba = 0;
  15. while(*z != '\0')
  16. {
  17. if(filter(*z, filtr))
  18. {
  19. *d = *z;
  20. ++d;
  21. liczba++;
  22. }
  23. z++;
  24. }
  25. *(d++) == '\0';
  26. return liczba;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement