Looks like two global constant variables (lol) put in the cppfsm namespace.
One variable is an std::string and is initialized to the alphabet.
The other variable is an std::set container, constructed to contain all the letters in the s_alpha string.
Sets have a special rule: they don't contain more than one element of a given value (say you add another 'A' character to alpha, you'd still only have a single 'A' in it because nothing gets added). They also appear to sort themselves automatically, because they're usually implemented via trees.
I have one more question!!
If I get input string like this!! "I have to do homework," and I want to check if 't' is in this string, do I still have to use loop and iterator?? or is there another way to check this??
I know that in python language, if I do 't' in "I have to do homework," it returns boolean!! is there a way to do same thing in c++??