C, realloc that fails if the allocation cannot grow IN PLACE

一曲冷凌霜 提交于 2019-12-24 00:55:20

问题


Is there a way to grow an array in C, but only if the memory can be grown in place (That is, fail to grow if the pointer needs to be changed)?


回答1:


In standard C there is no function capable of doing that.



来源:https://stackoverflow.com/questions/21630787/c-realloc-that-fails-if-the-allocation-cannot-grow-in-place

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!