Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- #include <cctype>
- std::string disenvowel(const char* source) {
- const char* vowels = "aeiou";
- std::string result;
- int i=0;
- while (source[i]) {
- if (!strchr(vowels, tolower(source[i])))
- result += source[i];
- ++i;
- }
- return result;
- }
- int main() {
- std::cout << disenvowel("This is A TEST...") << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement