But my problem is now that when a user inputs 4jlkjl, it get a valid input cause of the leading number. How do I make such a input to generates an error? I've looked a little at stringstream but haven't figgered out something good yet. Anyone got any ideas?