hi...i m learning the concepts of exception handling and trying to run my first program using try- catch block.
the problem is the compiler is not able to identify try and catch keywords.
is there a problem in the compiler or do i have to include any special header file for it.??
plz guide me...the code is as follows:
Code:#include<iostream.h> #include<conio.h> void main() { int a,b; cin>>a>>b; int x=a-b; try { if(x!=0) cout<<“Result (a/x)”<<a/x<<“\n”; else throw(x); } catch (int i) { cout<< “Exception caught”<<i<<“\n”; } cout<<“End”; getch(); }