+ 2
What are the exception in c++ and how they are used in program
All About exception handling, and where it used in program
3 Réponses
+ 5
C++ Exception Handling. An exception is a problem that arises during the execution of a program. A C++ exception is a response to an exceptional circumstance that arises while a program is running, such as an attempt to divide by zero
+ 2
Exception occur when something goes wrong, due to incorrect code or input. When an exception occurs, the program immediately stops.
Different exceptions are raised for different reasons.
To handle exception c++ has a feature called try catch.
try {
//code that might causes an exception
}
catch(...) {
// code to handle exception
}