I have a while loop, within it I get an integer variable...the problem is if the user enters a character the loop goes into a cycle infinitely, my work around was kind of humorous...i added one to a loop count and if it went over 20 in one shot i killed the loop and went on with an error, cleaned up and exited. But, i want to formulate a try catch block so that i can restart the loop safely to get a number instead of a letter....any ideas?
a stripped down example would work great, i've seen tuturials but they're examples are too vague...i cna't get a grip on it



LinkBack URL
About LinkBacks



