Tutorials
Courses
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.0K+ articles
C++
3.7K+ articles
C++ Programs
1.5K+ articles
Programming Language
339+ articles
CPP-Basics
102+ articles
C/C++ Puzzles
68+ articles
cpp-template
40+ articles
Interview Prep
22+ articles
cpp-exception
15+ articles
C++-Exception Handling
15 posts
Recent Articles
Popular Articles
Exception Handling & Templates Interview Questions - C++ Programming
Last Updated: 08 August 2025
In modern C++, writing robust, reusable, and efficient code is key. Two important pillars that support this are:Exception Handling: C++ supports a structured error-handlin...
read more
cpp-template
C++-Exception Handling
Interview Prep
How to Detect Memory Leaks in C++?
Last Updated: 23 July 2025
Memory leaks are a common and serious problem in C++ programming. They occur when dynamically allocated memory using operators likenewor functions likemalloc from the heap...
read more
C++ Programs
C++
Picked
Dynamic Memory Allocation
C++-Exception Handling
CPP Examples
How to Use the Try and Catch Blocks in C++?
Last Updated: 23 July 2025
In C++, thetryandcatchblocks are used as a part of the exception handling mechanism which allows us to handle runtime errors. If the exceptions are not handled properly th...
read more
C++ Programs
C++
Picked
cpp-exception
Exception Handling
C++-Exception Handling
CPP Examples
How to Throw an Exception in C++?
Last Updated: 23 July 2025
In C++, exception handling is a mechanism that allows us to handle runtime errors and exceptions are objects that represent an error that occurs during the execution of a ...
read more
C++ Programs
C++
Picked
cpp-exception
C++-Exception Handling
CPP Examples
How to Throw and Catch Exceptions in C++?
Last Updated: 23 July 2025
In C++, exception handling is a mechanism that allows us to handle runtime errors and exceptions are unusual conditions that occur at runtime. In this article, we will lea...
read more
C++ Programs
C++
Picked
cpp-exception
C++-Exception Handling
CPP Examples
How to Catch a Specific Exception in C++?
Last Updated: 23 July 2025
In C++, exceptions are runtime anomalies or abnormal conditions that a program encounters during its execution. The process of handling these exceptions is called exceptio...
read more
C++ Programs
C++
Picked
cpp-exception
C++-Exception Handling
C++ Errors
CPP Examples
How to Throw a Custom Exception in C++?
Last Updated: 23 July 2025
In C++, exception handling is done by throwing an exception in a try block and catching it in the catch block. We generally throw the built-in exceptions provided in the e...
read more
C++ Programs
C++
Picked
cpp-exception
Exception Handling
C++-Exception Handling
CPP Examples
How Do I Continue to the Next Iteration of a for Loop After an Exception is Thrown in C++?
Last Updated: 23 July 2025
In C++, when an exception is thrown, the normal flow of the program is disrupted and we need to take care of it. In this article, we will learn how can we continue to the ...
read more
C++ Programs
C++
Picked
cpp-exception
C++-Exception Handling
CPP Examples
How to Handle Incorrect Values in a Constructor?
Last Updated: 23 July 2025
In C++, constructors are used to construct and initialize the object of its class. If incorrect values are given to the constructor, then it may cause inconsistency in a p...
read more
C++ Programs
C++
Picked
C++-Constructors
C++-Exception Handling
CPP-OOPs
CPP Examples
How to Catch Floating Point Errors in C++?
Last Updated: 23 July 2025
In C++, a part of the code that may throw exceptions is enclosed in try-and-catch blocks to handle them when they arise. We can also use try...catch to catch floating poin...
read more
C++ Programs
C++
Picked
cpp-exception
Exception Handling
C++-Exception Handling
CPP Examples
Exception Handling using Classes in C++
Last Updated: 23 July 2025
In C++, unexpected issues may occur during program execution such as attempting to divide by zero, accessing a non-existent file or using invalid data. These issues are ca...
read more
C/C++ Puzzles
C++ Programs
C++
CPP-Basics
cpp-exception
C++-Exception Handling
NULL undeclared error in C/C++ and how to resolve it
Last Updated: 15 July 2025
What is undeclared Error: When we use some constant in our program maybe they are built-in constant and may be created by a user according to the requirement. But when we ...
read more
C++
C++-Exception Handling
Exception Header in C++ With Examples
Last Updated: 12 July 2025
C++ provides a list of standard exceptions defined in header exception in namespace std where "exception" is the base class for all standard exceptions. All exceptions lik...
read more
C++ Programs
Programming Language
C++
cpp-exception
C++-Exception Handling
User-defined Custom Exception with class in C++
Last Updated: 11 July 2025
We can use Exception handling with class too. Even we can throw an exception of user defined class types. For throwing an exception of say demo class type within try block...
read more
C++
C++-Exception Handling
Stack Unwinding in C++
Last Updated: 23 July 2025
Stack Unwinding is the process of removing function call frames from function call stack at run time. The local objects are destroyed in reverse order in which they were c...
read more
C++
C++-Exception Handling
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !