I read about the vector/list/map types contained in the stardard template library of C++ and I couldn't find one that behaved as such:
myMap::autofillingmap m;
m[0] = 2; // m[] = [2]
m[1] = 3; // m[] = [2, 3]
m[4] = 5; // m[] = [2, 3, 0, 0, 5]
m[10] = 1 // m[] = [2, 3, 0, 0, 5, 0, 0, 0, 0, 0, 1]
Is there any cpp lib that emulates this behavior?
(beforehand observation: Yes, I do know this is not optimal methodology to work data structures out. Thanks)