Unsolved Custom Index Array
-
Hello,
I have a QVector of QString like:data[0][0] = "Person 1"; data[0][1] = "Person 2";
But I need change the index number to a custom value to associate with an ID.
data[0][123] = "Person 1"; data[0][124] = "Person 2";
Is there any way to do this?
My bests regards!
-
Hi
you could use a map?
http://www.cplusplus.com/reference/map/map/map/ -
Thanks for open my eyes!
Have a great day.
-
@Helson
:)
Well, one note about maps.
if you do
map[1000]="something"
and its not there , it will be added.
So that is not always what one expects.
Its just a note. you might not encounter it :)Good day to you too.
Also note:
there is qmap (qt version)