123456789101112131415161718
int main() { short * pPtr; pPtr= new short;//1 *pPtr= 1; cout << "*pPtrValue: " << *pPtr<< "\tMemory Address: " << pPtr<< endl; pPtr= new short;//2 *pPtr= 5; cout << "*pPtrValue: " << *pPtr<< "\tMemory Address: " << pPtr<< endl; delete pPtr;//1 pPtr=0; return 0; }