How to write a equivalent code in c replacing redim other then realloc
This is a discussion on VB Redim within the C Programming forums, part of the General Programming Boards category; How to write a equivalent code in c replacing redim other then realloc...
How to write a equivalent code in c replacing redim other then realloc
French rouge: How to write a equivalent sentence in English replacing rouge other then red
Use malloc() to allocate a new array, copy elements from the old array to the new one, and release the old array.
That is sort of pointless, since that achieves what realloc() does, except that realloc() typically does it more efficiently.
There is no other way in standard C.
Right 98% of the time, and don't care about the other 3%.