Someone told me that doing the following to check if the allocation of memory was successful is wrong.
Is that wrong or is it the correct way to check if the allocation was successful?Code:int *tempInteger = new int[10]; if(!tempInteger) // ERROR.
If not, what is the proper way to do that?