In C++
Define a C-string function
void copyWithFilter(char * destination, const char * source, constchar * filter)
that copies the characters of C-string source into destination, butomits any characters that are NOT in the C-string filter. Forexample
filter(w, “bananas”, “aeiou”);
cout << w;
will output “aaa”.
Hint: include a helper function bool isIn(char c, const char * s) ;that returns true iff c is a character in s.
Use pointer notation. No square brackets allowed.
Driver athttp://www.chabotcollege.edu/Faculty/jtraugott/CodeLab/filter.cpp
Expert Answer
An answer will be send to you shortly. . . . .