Hey friends,
I coded this program in c++ with that blue window background software(I don't know its version) that i usually use. I save this program as excepp.cpp and got 4 errors : Undedined symbol: try and undefined symbol : throw , Statement missing ; and statement missing ; .
Thanks in advance :-)
I coded this program in c++ with that blue window background software(I don't know its version) that i usually use. I save this program as excepp.cpp and got 4 errors : Undedined symbol: try and undefined symbol : throw , Statement missing ; and statement missing ; .
Code:
#include<iostream.h>
#include<conio.h>
class ex
{
};
class ex1: public ex
{
};
class sample
{
public:
void fun()
{
throw ex1();
}
};
void main()
{
try
{
sample s;
s.fun();
}
catch(ex e1)
{
cout<<"ex exception";
}
catch(ex1 e)
{
cout<<"EX! exception";
}
getch();
}
Comment