Storing the distinct vowels in the string by checking if it in the list of string and not in the list of distinct vowels
for ( int i = 0 ; i < length ; i ++ ) { if ( find ( x , x + 5 , str [ i ] ) != x + 5 and find ( y . begin ( ) , y . end ( ) , str [ i ] ) == y . end ( ) ) y . push_back ( str [ i ] ) ; }