2014年6月28日

new的使用

摘要: 当我们使用关键字new在堆上动态创建一个对象时,它实际上做了三件事:获得一块内存空间、调用构造函数、返回正确的指针。Struct A;A* p = (A*)new(0) A;void* operator new(size_t size, int32_t n)throw(){}首先new查找A里面的o... 阅读全文

posted @ 2014-06-28 17:32 loying 阅读(148) 评论(0) 推荐(0) 编辑

导航