#include #include /* This file contains evil non-standard C++... and cut and pasted code that should be a function but sholden is too lazy... */ void output_array(int *array, int size); int main() { int *pointer1 = new int[4]; for (int i=0;i<4;i++) pointer1[i] = i; std::cout << "Pointer one points to : "; output_array(pointer1,4); delete[] pointer1; std::cout << std::endl; std::cout << "After we delete pointer one we have:\n"; std::cout << "Pointer one points to : "; output_array(pointer1,4); char *pointer2 = new char[16]; std::cout << std::endl; std::cout << "Now allocate pointer two to be an array of 16 chars\n"; strcpy(pointer2,"abcdefghijklmno"); std::cout << "Pointer one points to : "; output_array(pointer1,4); std::cout << "Pointer two points to : \""<