Hi I have a question about set function!!
I got an assignment for my programming class that is to make Finite State machine!!
Professor provided the header file that contains each state and set<char> that has each alphabet and number..!!
The question is how do I compare an input character and the character inside the set<char>??
lets say if I have set<char> alphabet;
And inside the alphabet = 'A', 'B', 'C', ... 'x', 'y', 'z'!!!!
I tried this!
Get an input, c = 'b';
set<char>::iterator alph;
alph = alphabet.find(c);
Searches the container for an element with a value of x and returns an iterator to it if found, otherwise it returns an iterator to set::end (the element past the end of the container).