// basic use of dynamic memory // Michael L. Collard // 11/04/99 #include int main() { int *pn=nullptr; //declaring a pointer pn = new int(4); // pn points to a new integer *pn = 5; // can change that new integer delete pn; // now will get rid of it // very dangerous to do since the integer no longer exists // cout << *pn << '\n'; }