resizing an array with C

Posted by Gary on Stack Overflow See other posts from Stack Overflow or by Gary
Published on 2010-05-30T03:25:20Z Indexed on 2010/05/30 3:32 UTC
Read the original article Hit count: 302

Filed under:
|
|
|

So I need to have an array of structs in a game I'm making - but I don't want to limit the array to a fixed size. I'm told there is a way to use realloc to make the array bigger when it needs to, but can't find any working examples of this.

Could someone please show me how to do this?

Thanks!

© Stack Overflow or respective owner

Related posts about c

    Related posts about arrays