I want to know why my pc deal with the exception is:
the following informations:
Project Project 1.exe raised exception class int with message 'Exception Object Address: 0x995ADA' Process stopped. Use Step or Run to continue.
I do not why, the code is as following:
Expand|Select|Wrap|Line Numbers
- #include <iostream>
- using namespace std;
- void main ()
- {
- int a = 0;
- int b;
- try
- {
- while(a != 4)
- {
- cout<<"Please input a number!! "<<endl;
- cin>>a;
- }
- if(a == 4)
- throw a;
- }
- catch (int a)
- {
- cout << "An exception occurred. Exception Nr. " << endl;
- }
- }