Can I build a long list <int> so that the index is long?
3 answers
You cannot change the Framework <> interface, which indicates the type of the index argument as int . But you can create your own type that takes a long index.
As JaredPar noted, you cannot create an array that is large enough to require a 64-bit index. If you want to create a list in which you can store so many elements, you will have to use some kind of tree structure or arrays of arrays or something like that. And you will need a lot of memory!
0