#include using namespace std; void main() { char* p = new char; char a = 'a'; //* what's at *p = 'a'; *p = a; //makes p point to the address of a delete p; p = NULL; //delete p; //do not delete a NULL pointer //delete p; // you can only give back the same memory once p = &a; //delete p; //you can not give back static memory a = 'b'; cout << *p << endl; p = new char[1000]; p[1] = 'i'; *p = 'a'; *(p+1) = 'b'; delete []p; //const char* cp1 = new char; //*cp1 = 'a'; //cout << *cp1 << endl; //char const * cp2 = new char; //*cp2 = 'a'; //cout << *cp2 << endl; //char* const cp3 = new char; //cp3 = &a; //*cp3 = 'a'; //cout << *cp3 << endl; //const char* const cp3 = new char; //cp3 = &a; //*cp3 = 'a'; //cout << *cp3 << endl; }