fork download
  1. #include<iostream>
  2. #include<conio>
  3. using namespace std;
  4. void main()
  5. {
  6. int a;
  7. cout<<"enter your value\n";
  8. cin>>a;
  9. try
  10. {
  11. if(a==0)
  12. {
  13. throw(a);
  14. }
  15. else
  16. {
  17. cout<<"a="<<a;
  18.  
  19. }
  20. }
  21. catch(int i)
  22. {
  23. cout<<"exception a="<<i;
  24. }
  25. getch();
  26. }
  27.  
  28.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:16: fatal error: conio: No such file or directory
 #include<conio>
                ^
compilation terminated.
stdout
Standard output is empty