|
-
Dec 29th, 2001, 01:41 AM
#1
Thread Starter
Addicted Member
newbie..Exception Handling
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...
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|