摘要:
1.基础知识/*可以定义大小是0的数组,但不能引用,因为没有指向任何对象new string[10]调用类的默认构造函数new int[10]没有初始化,但new int[10]()会将数组初始化成0,返回第一个元素的首地址*/#include #include using namespace st... 阅读全文
posted @ 2014-05-16 22:28
zzyoucan
阅读(364)
评论(0)
推荐(0)
摘要:
#include using namespace std;struct MyStruct{ int s;};int main(){ void* addr = new MyStruct;//缓冲区地址,大小为mysturct的大小 int * naddr = new (addr)in... 阅读全文
posted @ 2014-05-16 00:42
zzyoucan
阅读(225)
评论(0)
推荐(0)

浙公网安备 33010602011771号