Nominull comments on Positive Bias Test (C++ program) - Less Wrong
You are viewing a comment permalink. View the original post to see all comments and the full post content.
You are viewing a comment permalink. View the original post to see all comments and the full post content.
Comments (75)
Program could use some protection against invalid input, along the lines of
and if you really wanted to get fancy you could throw in an error message when it occurs
it's not nice to have a program that goes into an infinite loop if you give it a letter instead of a number
wow, I didn't know iostream was that badly broken.
Fixed, though it now aborts completely if you give it a letter.
It could be worse. The C++ keyboard console input libraries are, indeed, horrible - but you could be stuck trying to do the same thing in plain old C. ::shudders::