int *Array, *Single; Array = new int [100]; Single = new int; delete [] Single; // Wrong, but an exception is NOT thrown. delete Array; // Wrong, but an exception is NOT thrown.
Does anyone knows what is the effect of using 'delete' and 'delete []' in the above (wrong) way? I'm asking because I'm dealing with dynamic memory allocation often, and I want to know what to expect if I do the above mistake.

New Topic/Question
Reply




MultiQuote




|