Re: Class hierarchy of exceptions (Ada, C++)
From: fabio de francesco (fmdf_at_tiscali.it)
Date: 03/30/05
- Previous message: Daniel Schüle: "Re: Why assembly and translation"
- In reply to: Ioannis Vranos: "Re: Class hierarchy of exceptions (Ada, C++)"
- Next in thread: fabio de francesco: "Re: Class hierarchy of exceptions (Ada, C++)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Mar 2005 05:24:47 -0800
Ioannis Vranos wrote:
> fabio de francesco wrote:
>
> > Is the following permitted in C++?
> >
> > // file point.cpp
> > [skip code]
> >
> > Shouldn't it have to complain?
> It is permitted. What you are incrementing above is the value stored
in variable a.
Yes, with the only problem that the stack has already released space
reserved for that variable called "a".
> Also check this:
>
>
> #include <iostream>
> #include <cstdlib>
> #include <csignal>
>
>
> inline void SigSegVHandler(int signal)
> {
> using namespace std;
>
> cerr<<"Illegal memory operation!\n"<<"Exiting...\n";
>
> exit(EXIT_FAILURE);
> }
>
> int main()
> {
> using namespace std;
>
> signal(SIGSEGV, SigSegVHandler);
>
> int *p= 0;
>
> ++(*p);
>
> return 0;
> }
Here you catch and handle a system SIGSEGV signal... I am missing the
point.
> Ioannis Vranos
>
> http://www23.brinkster.com/noicys
fabio de francesco
- Previous message: Daniel Schüle: "Re: Why assembly and translation"
- In reply to: Ioannis Vranos: "Re: Class hierarchy of exceptions (Ada, C++)"
- Next in thread: fabio de francesco: "Re: Class hierarchy of exceptions (Ada, C++)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|