For some reason it works for me (I use DevC ++ 5.11):
int* a=new int(13); cout<<a<<endl; //0x635800 cout<<*a<<endl; //13 delete a; *a=123; (*a)*=2; cout<<a<<endl; //0x635800 cout<<*a<<endl; //246 After freeing the memory cell pointed to by a , judging by the address, a new value was added to it, which can even be extracted, multiplied and the result placed in the same cell. Displays what was expected: 246. It says that "you can not do this": https://ru.stackoverflow.com/a/564989/279581 Why, if everything works? What does delete a; ?
