Mail Archives: djgpp/1998/05/13/09:16:02
"Lion" <ifestos AT the DOT forthnet DOT gr> wrote:
>Why this piece of code exit with problem?
What error message does it print if any?
>I think, new operator returns 0 if there is no memory available...
The ANSI C++ standard says new should throw an exception when you run
out of memory. But I don't know if this is implemented in GCC yet.
If your getting ``Abort!'' as your message it could be caused by an
uncaught exception.
>main ()
>{
> int ii;
> for (;;) if (!(ii=new int) break;
>}
David.
David Vrabel d DOT vrabel AT n-shropshire DOT ac DOT uk
A poor student (aren't they all) at:
North Shropshire College
Oswestry, Shropshire, UK
- Raw text -