title: Queue-like data structure with random access element removal
body: <p>Is there a data structure like a queue which also supports removal of elements at arbitrary points? Enqueueing and dequeueing occur most frequently, but mid-queue element removal must be similar in speed terms since there may be periods where that is the most common operation. Consistency of performance is more important than absolute speed. Time is more important than memory. Queue length is small, under 1,000 elements at absolute peak load.In case it's not obvious I'll state it explicitly: random insertion is not required.</p>
  
  <p>Have tagged C++ since that is my implementation language, but I'm not using (and don't want to use) any STL or Boost. Pure C or C++ only (I will convert C solutions to a C++ class.)</p>
  
  <p>Edit: I think what I want is a kind of dictionary that also has a queue interface (or a queue that also has a dictionary interface) so that I can do things like this:</p>
  
  <pre><code>Container.enqueue(myObjPtr1);
  MyObj *myObjPtr2 = Container.dequeue();
  Container.remove(myObjPtr3);
  </code></pre>