I don't think he's talking about QVector. Just vector.
And I also think a linked list would be better suited for the job.
I don't think he's talking about QVector. Just vector.
And I also think a linked list would be better suited for the job.
"The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry
reserve() works in a simmilar way for all std::vector-like implementations (including QVector).
It depends. The drawback of using a linked list is that accessing items in a non-sequential order is slower. If you know the size of the data array you need upfront, using vector or an arraylist (like QList) should be better.And I also think a linked list would be better suited for the job.
Bookmarks