Well, ok ... not sure what is going on here with this rather innocuous code:
All I am doing is dynamically assigning memory and then deleting it. r is set to a nullptr along with p and q. This is producing debug assertion problems in Visual Studio.Code:int main(bleh blah){ int *p(new int(124)); int *q = new int(40); int *r = p; p = q; cout << *r << endl; delete p; delete q; p = q = r = nullptr; return whatever }
I am already acquainted with smart pointers such as shared_ptr, unique_ptr, and weak_ptr so I am simply exploring managing dynamic memory myself.