Suppose I have a vector in c++ as v = ('a','e','i','o','u')
. I want to check whether a string is a vowel or not by simply checking if the character is in the vector v or not. I don't want any code for that as I myself know that , I am looking for a function or a keyword in c++ which is equivalent of below in python :
list = ['a', 'e', 'i', 'o', 'u']
if str in list:
#do stuff
PS : Also let me know if nothing equivalent to this exists.