Hi All,
Plz help me if you can.....
I have a program something like this
int main(int argc,char* argv[])
{
try
{
int* p = NULL;
int i = *p;
}
catch(int* ptr)
{
cout<<"Caught Null pointer Exception\n";
}
catch(...)
{
cout<<"Caught an Exception\n";
}
return 0;
}
Result of this program is
"Caught an Exception"
But i was expecting "Caught Null pointer Exception"
Now plz tell me how to know in which line exception occured and which exception occured
Eagerly waithig for your reply..........
Plz help me if you can.....
I have a program something like this
int main(int argc,char* argv[])
{
try
{
int* p = NULL;
int i = *p;
}
catch(int* ptr)
{
cout<<"Caught Null pointer Exception\n";
}
catch(...)
{
cout<<"Caught an Exception\n";
}
return 0;
}
Result of this program is
"Caught an Exception"
But i was expecting "Caught Null pointer Exception"
Now plz tell me how to know in which line exception occured and which exception occured
Eagerly waithig for your reply..........
Comment