When you use cin to input an integer or double and the user inputs a character the program goes into an infinite loop. I have researched this online and seen that some have suggested using isdigit() isalpha() or isalphanum(), but i have tried these functions and they seem to only return zero since i am using doubles. How can i get around this, or alternately, is there another way to test that the input was a decimal number? Thanks to anyone who is willing to help a noob with his coding problem :P