array
int
data
int * data = (int *) malloc(sizeof(int) * 3); //Now there are 3 elements in the array 'data'. //Assigning values data[0] = 1; data[1] = 2; data[2] = 3;
data[1]
free
data[0]
[data2]
int * newData = (int *) malloc(sizeof(int) * 2); newData[0] = data[0]; newData[1] = data[2]; free( data ); data = newData; newData = null;
free( data );
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)