--- In [email protected], Ravi Mishra <ravics...@...> wrote: > > actually intally i don't know how much byte will allocate memory for > sturcture and second time i have to preserve the first user memory and > append second user allocate memory and so on.
realloc sounds ideal: http://www.linuxmanpages.com/man3/realloc.3.php > Any other approach is there... Depends how you want to use your lists - the realloc method is simple but can be inefficient. You might consider using a linked list mechanism. http://en.wikipedia.org/wiki/List_(computing)
