This is my CPP solution.
class Solution {
public:
string reverseVowels(string s) {
string vowel_store;
string vowel = "aeiouAEIOU";
for(int i=0;i<s.size();i++)
if(find(vowel.begin(),vowel.end(),s[i])!=vowel.end())
vowel_store.push_back(s[i]);
int j = vowel_store.size()-1;
for(int i=0;i<s.size();i++)
if(find(vowel.begin(),vowel.end(),s[i])!=vowel.end())
s[i] = vowel_store[j--];
return s;
}
};