here's a code I gleaned frrom a book...

#include<iostream.h>

class Bummer{};
class Dummer{};
class Dumm{};
void main()
{
try{

throw Dumm();
}
catch(Bummer)
{
cout<<"helo Bumer";
}
catch(Dummer)
{
cout<<"helo Dummer";
}
catch(...)
{
cout<<"helo rest of u";
}

}


what I wanna know is tt y is it necessary 2 create these Classes ..Bummer Dummer..I mean..y cant v just say sumthing lik

throw(5)

catch(int i)
{
select case i
{
//coding here...
}