摘要: 实验一:证明new_handler全局函数是否存在 #include <iostream> #include <new> #include <cstdlib> #include <exception> using namespace std; class Test { int m_value; pu 阅读全文
posted @ 2020-02-13 09:58 一代枭雄 阅读(278) 评论(0) 推荐(0)
摘要: 动态内存申请一定成功吗?常见的动态内存分配代码 C代码: int* p = (int*)malloc(10 * sizeof(int)); if( p!=NULL ) { //... ... } C++代码: int* p = new int[10]; if( p!=NULL ) { //... . 阅读全文
posted @ 2020-02-13 09:42 一代枭雄 阅读(247) 评论(0) 推荐(0)