i need some advice i cant get the results im looking for and im completely lost.
i want to take only the THIRD character of a 5 letter string and cout the correct message
short ex.
12b35 couts Blue.
12w34 couts white
12g34 couts green
12r45 couts red
i dont know whats going wrong its take the third character but i dont want it to cout everything just the correct message. help?
switch(item.at(2)==letter)
This is either true or false, not B, W, G, R. The switch structure always compare on equality (put a default for debug)
Should be switch(item.at(2))