newとdelete

#include < iostream >
using namespace std;

int main()
{
    int *p;
    
    p = new int;
    if(!p) {
        cout << "memory set error\n";
        return 1;
    }
    
    *p = 1000;
    cout << "p point integer is: " << *p << "\n";
    delete p;
    return 0;
}