Like Tree2Likes
  • 1 Post By qny
  • 1 Post By grumpy

VB Redim

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...

  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    33

    VB Redim

    How to write a equivalent code in c replacing redim other then realloc

  2. #2
    qny
    qny is offline
    Registered User
    Join Date
    Sep 2012
    Posts
    355
    French rouge: How to write a equivalent sentence in English replacing rouge other then red
    Salem likes this.

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    5,827
    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.
    Salem likes this.
    Right 98% of the time, and don't care about the other 3%.

Popular pages Recent additions subscribe to a feed

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21