Inexperienced with c++ structures: I need a structure that fills the following:
Can hold about ~100, I’d say 500 at max objects (each which might be very big in memory: containing clips of images)
Ordered by an int the object has: I want it so I say “Add this object with priority 2. And then add this object with priority 3!”, and have the collection be (Object w/Priority 3, Object w/Priority 2), so as to iterate it from the start, starting from the objects with highest, to lowest, priority.
Does not need deletion (could be handy, but not a requirement)
Need to be able to access the objects inside, anywhere they be.
Sounds like a priority queue. In C++ it’s implemented as
std::priority_queueand here’s an example.