Topic: How it is correct storage?
I implement two-dimensional dynamic array. At its creation the amount of elements on both measurements precisely is not known.
Therefore it would be desirable somehow optimally storage:
1. delete and new kill all piece of storage and create it on the new.
2. realloc does not transfer the old data to new storage, it in parameters does not have size of old memory size.
How the similar task is better to solve?
p.s. The second measurement of arrays accepts great values (the one million order), the construction "an array of arrays" (instead of one piece in which by means of the sizes of an array and two indexes the current uniform index is defined) therefore is desirable.