new1.c

来自「this is a gcc file, you can download it 」· C语言 代码 · 共 20 行

C
20
字号
// Copyright (C) 1999 Free Software Foundation// by Alexandre Oliva <oliva@dcc.unicamp.br>// based on comp.std.c++ post by Alexander Schiemann <aschiem@math.uni-sb.de>// execution test#include <new>#include <stdlib.h>struct A {  A() { throw 0; }  void* operator new(size_t size, double = 0.0) { return ::operator new(size);}  void operator delete(void* p, double) { exit(0); }  void operator delete(void* p) { abort(); }};int main() { try { new A; } catch(...) {} }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?