So, I've developed some applications in C++, so I'm not that new in the C++ world, but I can't figure out why we can't find the size of a dynamically allocated array in C++.
In particular, looking at the documentation, if I write:
delete[] array;
it will delete all the elements in the array (allocated on the heap)... now, in order to delete it, there must be something wrote on the memory to tell the deallocator "how many bytes compose that array"... and therefore the question, why can't we also have that information?