释放内存出错
为什么在使用free释放时会出错呢?
#include< stdio.h > #include< malloc.h > int main(void) { char *p; char a[]="FireRabbit"; p=malloc(sizeof(a)); //分配和数组a一样的空间 p="FireRabbit"; puts(p); free(p); //调用结束后将其释放 return 0; }

我的愿望是用C++开发自己的游戏引擎。
在此之前还有许多东西要学……