-
15th August 2013, 21:43
#10
Assadministrator
If you want to have a variable length, you need to use realloc(): http://www.cplusplus.com/reference/cstdlib/realloc/
The function doesn't allocate new memory, it's just "extended" the old memory (so you don't need to copy the old data to a new malloc()-block etc.)
I guess you don't want that also, but there is no other way besides using some external libraries like GLib
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules