Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

c realloc

/*prototype of realloc*/
void *realloc(void *ptr, size_t newsize);

/*use*/
dyn_array = realloc(dyn_array, (dyn_array_size + 1) * sizeof(int));

/*
	adds one more space to dyn_array
    you need stdlib.h for this
*/
Source by openbook.rheinwerk-verlag.de #
 
PREVIOUS NEXT
Tagged: #realloc
ADD COMMENT
Topic
Name
6+9 =