If you're doing it the correctly with if statements then no there shouldnt be any problem. The reason its not working is because you're probably doing it incorrectly. So why dont you show the same code done with if statements so we can take a look at whats wrong.
And please... I know me and many others have told you this literally over 10 times now, but just use code tags for the love of mine and everybody else's eyes. Its much clearer to spot things that are wrong and people can help you out better if you use code tags. Its that simple, use code tags. Just follow the instructions on this page and stop ignoring everytime someone mentions it - http://www.cplusplus.com/articles/jEywvCM9/