#include using namespace std; int main() { int *data, *temp; int i; data = new int[5]; // the orginal array for (i = 0; i < 5; ++i){ data[i] = i; } temp = new int[10]; // for the new larger array //copy from original array into new array for (i = 0; i< 5; ++i){ temp[i] = data[i]; } delete [] data;//deallocate original array data = temp; // make data point to the new array for (i = 5; i < 10; ++i){ //insert more data data[i] = i; } //deallocate when done delete [] data; return 0; }