design our own container

how can i write my own container which has properties of both vector and list.

eg. i can access elements directly using [] operator like vector and behave like list in terms of memory(means we dont have to shift elements if we want to insert in between like list)
https://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/a01115_source.html
Don't re-invent the wheel.

You can do square brackets by overloading "operator[]" in any casual class / struct, just like how the vector does it.
Topic archived. No new replies allowed.