I have looked around here and similar sites the past few days and have spent many hours trying to come up with a solution and would like to reach out for advice.
I have come to the disappointing conclusion that without going into boost libraries for C++ there is no possible way to create an associative container which retains an indexed ordering.
More clearly and specifically what I am in need of, is a map which can lookup using operator[key] but also is indexed in the order elements were added for iteration purposes.
I decided this morning I would need to write one myself, and I have tried a few approaches using maps of maps and vectors of pairs, etc. But nothing has actually worked and getting all of the functionality I am looking for is surprisingly not easily achievable whatsoever in this language. Ive got to be wrong right? Has anyone else had an experience with needing this functionality or familiar with this concept that could point me in the right direction of what I am looking for?
Many thanks in advance! Happy new year everyone.