thanks man
ur da bomb
The downside of using the stream states analysis route is that when user inputs 1o1 instead of 101 the fail bit will not be set. Instead the value of 1 will be assigned to the variable. This has two potential problems. First, the user won't know that 1 was assigned to the variable instead of 101 (until some time later, maybe), and second, I believe the o1 will remain in the input buffer to potentially screw up your next input sequence.
An alternative is to only accept input only as a string and parse the string for appropriateness. True, this isn't foolproof either. It also requires a little more coding on your part, particularly if you want to screen for float/doubles instead of just ints.