摘要:
转载自:http://www.cnblogs.com/BlueTzar/articles/1136549.html三个函数的申明分别是:void* realloc(void* ptr, unsigned newsize);void* malloc(unsigned size);void* calloc(size_t numElements, size_t sizeOfElement);都在stdlib.h函数库内它们的返回值都是请求系统分配的地址,如果请求失败就返回NULLmalloc用于申请一段新的地址,参数size为需要内存空间的长度,如:char* p;p=(char*)malloc(2 阅读全文