Hey,
So basically I'm using dynamic memory allocation, and I wanted to add in a check for if the new operator can't complete the request. I've read up that the operator will return a std::bad_alloc, but I've no idea how that helps me.
Could I just do?:
if (new int[999] == std::bad_alloc)
cout << "Ooops!";
Help, or hints would be appreciated!
Ed