Exception Handling C++

Subscribers:
50,600
Published on ● Video Link: https://www.youtube.com/watch?v=MHUNtxnpPgU



Duration: 0:00
400 views
20


C++ Exception Handling. An exception is an error or problem that arises during the execution of a program. Sometimes this will cause the program to stop running. We can catch and handle exceptions so that our program can continue running even after encountering the issue.

When handling exceptions, we use three keywords:

try: run code inside this block in case of errors
throw: throws an exception when a problem is detected
catch: catch an exception thrown from try block and run code inside this block

If you need to review these topics:
Vectors:    • C++ Vectors and Dynamic Arrays  
Functions:    • C++ Functions  

C++ Playlist:
   • C++ Programming Tutorial  

Install C++ with VS Code:
   • How to set up C++ in Visual Studio Code  

Subscribe for more coding tutorials 😄!