Hour 24. Dealing with Exceptions and Error Handling

Bugs, Errors, Mistakes, and Code Rot

The code you’ve seen in this book was created for illustrative purposes. It has purposely not dealt with errors so you won’t be distracted from the central issues being presented. Real-world programs, on the other hand, must take error conditions into consideration. In fact, in real-world programs, anticipating and handling errors can account for the largest part of the code!

It has been said that if cities were built like software is built, the first woodpecker to come along would level civilization. ...

Get Sams Teach Yourself C++ in 24 Hours, fifth 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.