/ Files / Dynamic.cpp
Dynamic.cpp
 1  #include <iostream>
 2  using namespace std;
 3  
 4  int main() {
 5      int *ptr = new int;
 6  
 7      *ptr = 10;
 8  
 9      cout << "Value: " << *ptr << endl;
10  
11      delete ptr;
12  
13      ptr = nullptr;
14  
15      return 0;
16  }