Actually, you did screw up your loop code in the snippet from post #7: Your termination check expression is an assignment instead of a comparison, so it not only unintentionally modifies your loop control variable, it also unconditionally evaluates to false. So I strongly doubt the stoi() call inside that loop would ever throw any sort of exception or other runtime error, since it never gets executed.

If you don't like books with a scholar attitude, and you're not going to learn C++ (that apparently you do not know perfectly by now) from the original ANSI/ISO standard document, which I wouldn' recommend to anyone at all for its high tideosity and boredom factor, I'd recommend to you Stroustrup's TC++PL. Due to its high level I do not recommend that book to beginners, but be warned that, yet, it's structured in chapters with increasing difficulty level that build upon each other, and it even does contain practice exercises.

And one more recommended reading (sorry for this one ): http://www.cplusplus.com/doc/tutorial/control/

I'd have to say quite some more, but typing is so tideous on the tablet...