
A Brief Introduction of the course, about its contents, Prerequisites of the course and knowing whether the course is right for you or not.
In this lecture we will be installing Dev C++ for Windows and Code Blocks for Linux and Mac Users. Off course you can use any other compiler of your own. I will be using Dev C++ throughout the course.
Download Dev C++ here - http://www.bloodshed.net/dev/devcpp.html
Download Code Blocks for Mac and Linux Users - http://www.codeblocks.org/downloads/26
Let me know if any of the link is not working.
In this lecture you will learn "why there is a need for Exception Handling." You can download the C++ file made in the lecture from the "Downloadable Resources" section.
Well we need to handle certain exceptions, For example - 10/0 is infinite or not defined. But computer doesn't know this and it generates an error as a result we are not able to run our programs. So we need certain mechanism called "Exception Handling" to handle such thing. But more on that later in the next lecture.
A brief description of what's inside Section 2 of this course. What topics you should emphasize on and what you will be able to implement at the end of this section.
In this lecture, you will learn understand the concept of Exception Handling, i.e, how it works. You will also know about there words which you should get yourself familiar with, i.e., try, catch and throw.
Try is used for handling the exception. Inside try block we have a throw statement which literally throws something. Finally we have catch block which accepts as a parameter the same data type which we have throw.
You can download the C++ file made in the lecture from the "Downloadable Resources" section.
In this lecture we will cover another example for Exception Handling. You will again use a try block that throws and integer as a result a catch block that receives an integer (with a formal parameter). Please note - catch Block will always immediately follow try block, no matter what.
You can download the C++ file made in the lecture from the "Downloadable Resources" section.
A brief description of what's inside Section 3 of this course. What topics you should emphasize on and what you will be able to implement at the end of this section.
In this lecture you will learn how to create a function that generates an Exception. First we will create a try block, and inside it we will call that function that generates an exception. Inside the function definition we will have a throw statement which will throw an exception. A throw block will be there(obviously - everytime you write a try block, make a catch block immediately) which will catch the exception.
You can download the C++ file made in the lecture from the "Downloadable Resources" section.
An extra lecture for throw keyword. How we can alter or write it in different ways.
A brief description of what's inside Section 4 of this course. What topics you should emphasize on and what you will be able to implement at the end of this section.
In this lecture you will learn the concept of "Multiple catch" statements. It is used so that we can catch different types of data types depending on what data type was thrown from the throw statement. For catching any data type whether it is float, integer, character or double(any) we use (...) inside the catch statement as catch(...) which signifies that any it can catch any type of data thrown.
You can download the C++ file made in the lecture from the "Downloadable Resources" section.
Another example for "Multiple catch statements" to help you better understand this concept.
You can download the C++ file made in the lecture from the "Downloadable Resources" section.
A brief description of what's inside Section 5 of this course. What topics you should emphasize on and what you will be able to implement at the end of this section as well as at the end of the course.
Just like we have nested "if statements", we can also create nested try blocks, i.e., another try block inside a try block.
You can download the C++ file made in the lecture from the "Downloadable Resources" section.
In this lecture you will learn how can we restrict our compiler to throw only certain data types. Now if you throw any other data type other than that you specified your compiler will stop working, since you now have a function that has restricted to throw only certain data types that you specified.
You can download the C++ file made in the lecture from the "Downloadable Resources" section.
Up till now we were throwing an exception either inside a try block or inside a function that was called from try block. Now we will learn how to put a throw statement inside a catch block by keyword throw; to rethrow the same exception that was being caught by that catch block.
You can download the C++ file made in the lecture from the "Downloadable Resources" section.
Update: From today (1st November 2022) this course is now free for all. After almost 3 years of launching this course I had finally decided to make this as free due to some reasons. I would like to express my gratitude & appreciation for all the students who enrolled in the paid version of this course.
Want to learn the most typical and important topic in any programming language. In this course you will learn Exception Handling in C++ covering all the basic to advanced topics with the help of great examples along the way.
I will be using Dev C++ as a compiler but you can use any compiler of your choice. Before starting the course you should have at least basic understanding of C++ syntax - operators, functions, control structure.
The course contains 5 section having total of 11 lectures - 2 hours of video content. Apart from that there are 9 C++ files included in the "Downloadable Resource" section for better understanding of its concepts. Also various MCQ's / Quizzes for better understanding of your concepts.
Here's a list of topics covered in the course -
Why there was a need for exception handling.
Basics of Exception Handling.
How Exception handling works / mechanism.
Use of try, catch and throw.
Function that generates exception.
Multiple catch statements.
How to Catch all the exceptions using (...)
Nested exception handling
Restricting / Specifying throw restriction
Re throwing an Exception
And much more along the way...
This topic is highly recommended on the perspective of Interviews for companies or Examination.