Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vector<char> trovaVocali(string str) {
- int strlen = str.length();
- vector<char> chvec;
- int chvec_pointer = 0;
- for (int i=0; i<strlen; i++) {
- string sub = str.substr(i,1);
- if (sub=="a"||sub=="e"||sub=="i"||sub=="o"||sub=="u") {
- chvec.at(chvec_pointer) = sub;
- chvec_pointer++;
- }
- sub = "";
- }
- return chvec;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement