title: Dividing a set (C++)
body: <p>I've got a <code>std::set&lt;int&gt;</code> which has <code>n</code> items in it. And I want to get rid of <code>n-k</code> bigger elements and keep the first (least) <code>k</code> elements. How should I do so? Is there a pre-defined function for this?</p>