Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If I'm not mistaken, size_t is used as an array index, which corresponds to the maximum memory size for a processor with a given bit depth. That is, the situation you describe cannot happen in principle.
en.cppreference.com/w/cpp/types/size_t
For the index, use the long type,
and for storage, use several arrays of the maximum size and, depending on the value of the index, calculate the real index of the desired array
with respect to any language, you can build a structure in which there will be an array of references to other arrays and the GetValue function with any type as a parameter, then determine in which array this element lies, for example, as a result of dividing the parameter by the maximum number of elements in the array, the remainder of this division will be the number of the element in the array. But in fact, the need for such a large array indicates the incorrectness of the application architecture, the task itself needs to be reconsidered.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question