C++ new 学习笔记
摘要:
在C++中使用new和delete来替换C中的malloc和free new 实现一维指针: 1 int * P; 2 P = new int; //开辟一个存放整数的空间,并返回一个存储空间的地址(即指针); 3 * P = 5; 4 5 int * P = new int(5); //与上相等 阅读全文
posted @ 2021-10-26 18:59
CharonVan
阅读(89)
评论(0)
推荐(0)
浙公网安备 33010602011771号