title: How to get a random element from a C++ container?
body: <p>What is a good way to get a [pseudo-]random element from an STL range?  </p>
  
  <p>The best I can come up with is to do <code>std::random_shuffle(c.begin(), c.end())</code> and then take my random element from <code>c.begin()</code>.</p>
  
  <p>However, I might want a random element from a <code>const</code> container, or I might not want the cost of a full shuffle.  </p>
  
  <p>Is there a better way?</p>