Take the 2-minute tour ×  Say I have a dynamic array like:  int*
integers = new int[100];  Is there a way to delete only part of
the array such as:  int* integers2 = integers + 50; delete[]
integers2;  I want to not only delete everything 50 and beyond,
but if I call another delete[] on the original integers array,
then it would only delete the correct amount of memory and not
try to delete the originally allocated amount and seg fault.
Why I want to do this: I have a data structure that is
structured in levels of arrays, and I want to be able to create
this data structure from a full array. So I want to be able to
say  int* level1 = integers; int* level2 = integers + 50; int*
level3 = integers + 100;  But when level 3 is no longer needed,
the data structure will automatically delete[] level3. I need to
know that this will behave correctly and not just destroy
everything in the array. If it will then I need to just create
new arrays and copy the contents over, but it would be nice to
avoid doing that for per