摘要: C中的malloc/relloc/calloc/free 1.malloc与free malloc函数用于分配指定大小的内存空间,并返回空间的首地址,若分配失败则返回NULL。free用来释放已分配的内存空间。 int main() { int* ptr = (int*)malloc(sizeof( 阅读全文
posted @ 2024-04-21 15:59 羡鱼OvO 阅读(39) 评论(0) 推荐(0)