Startertutorials Blog
Tutorials and articles related to programming, computer science, technology and others.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

CPP program to rethrow an exception

Categories: Exception Handling. 1 Comment on CPP program to rethrow an exception

In this article we will learn to implement a CPP program to rethrow an exception. A C++ program is provided below to demonstrate rethrowing an exception.   Subscribe to our monthly newsletter. Get notified about latest articles, offers and contests. Email address: Leave this field empty if you’re human: Program is as follows: #include <iostream> […]

Read the rest of this entry »

CPP program for handling divide by zero exception

Categories: Exception Handling. 5 Comments on CPP program for handling divide by zero exception

In this article we will learn to implement a CPP program for handling divide by zero exception. A C++ program is provided below for handling divide by zero exception. Program is as follows: #include <iostream> using namespace std; int main() { int a, b; cout<<"Enter two integer values: "; cin>>a>>b; try { if(b == 0) […]

Read the rest of this entry »