Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <cstring>
- using namespace std;
- char * function(char *d, char *z, char *filter){
- int x = strlen(z) + 1; int y = strlen(filter) + 1; bool b = false;
- for( ; *z ; z++, d++){
- for( ; *filter ; filter++){
- if(*z == *filter)
- b = true;
- }
- if(b)
- *d=*z;
- b = false;
- filter-=y;
- }
- return d;
- }
- int main(){
- char d[80];
- cout << function(d, "abbccddeeefa", "abd");
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement