Jay Taylor's notes
back to listing indexresizing an array with C - Stack Overflow
[web search]
Original source (stackoverflow.com)
Clipped on: 2013-11-07
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! |