Throwing multiple exceptions in c++. | Sololearn: Learn to code for FREE!


Throwing multiple exceptions in c++.

How to throw multiple exception and handle them? Pls try to explain using a suitable example. I'm totally confused.


11/25/2018 6:57:23 PM

Avinash Avi

6 Answers

New Answer


Avinash Avi , please check below code :



Ok Ketan I saw your code and I got the concept too but I have a query..... Is there any meaning of those integer or float values. I mean u used 100 and 23.1f so do these values make any specific sense or we can take any value?


Avinash Avi it is random value I took... you can have any value...


Ketan can you plz explain the significance of 'f' in 1.23f


sai for c++ , whole numbers are treated as int by default and real numbers are treated as double by default... for example, 12 is int by default and if we need compiler to consider this as long, we write 12L... 12.3 is real number nd compiler consider it as of double datatype by default... to treat it as float number, we need to explicitly tell this to compiler by putting f at the end of value...