View Single Post
Old Oct 5th, 2006, 7:19 PM   #8
climbnorth
Newbie
 
Join Date: Oct 2006
Posts: 16
Rep Power: 0 climbnorth is on a distinguished road
Pizentios:

On the contrary, you can reallocate memory using "realloc". This is useful if you want to constantly change the size of your chunk of memory.

Below- making CSV of params:

while(something())
{
  szSize += strlen(new_stuff);
  realloc(myArray, zSize2);
  sprintf(myArray, "%s,%s", myArray, new_stuff);
}
climbnorth is offline   Reply With Quote