http://www.enet.com.cn/article/2005/1013/A20051013461516.shtml
【简 介】
标准C++规定new一个对象时如果分配内存失败就应抛出一个std::bad_alloc异常,如果不希望抛出异常而仅仅传回一个NULL指针,可以用new的无异常版本:new(nothrow)。
http://www.enet.com.cn/article/2005/1013/A20051013461516.shtml
【简 介】
标准C++规定new一个对象时如果分配内存失败就应抛出一个std::bad_alloc异常,如果不希望抛出异常而仅仅传回一个NULL指针,可以用new的无异常版本:new(nothrow)。