Click to See Complete Forum and Search --> : cin.clear - HELP Pleeez


jplenhart
April 26th, 1999, 12:08 PM
I am trying to read in an integer type with some error handling that determines if it is a long integer. The problem is when I read in a value of say: 45 it works fine and the next time I read in a value of say: 55555555555555555 as expected the cin.fail is set correctly. The problem is when I try 45 again right after the cin.fail flag being set it keeps the cin.fail flag set to fail even though I have a cin.clear in the code to clear it. Any help is greatly appreciated.