How can I change the size of an array in C?

前端 未结 6 1142
灰色年华
灰色年华 2020-12-03 11:22

I am experimenting a little bit with gamestudio. I am making now a shooter game. I have an array with the pointer\'s to the enemies. I want. to when an enemy is killed. remo

6条回答
  •  生来不讨喜
    2020-12-03 11:48

    Take a look at realloc which will allow you to resize the memory pointed to by a given pointer (which, in C, arrays are pointers).

提交回复
热议问题