Summing Up
In this lesson, you saw the use of the try/catch statement to detect the occurrence of an input error. try/catch makes the code cleaner and easier to read. It also avoids duplication of error-handling code.
Get SAMS Teach Yourself C++ in 10 Minutes SECOND EDITION now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.