title: sorting vector on 2 parameters
body: <pre><code>struct bvp{
      unsigned b;
      unsigned v;
      unsigned p;
  };
  </code></pre>
  
  <p>vector  bvpVec; </p>
  
  <p>Now I want to sort the vector bvpVec first by b and then by v. I am able to sort using std::sort() using b only. But I am not getting how can I use bvpVec to sort first by b and then by p. E.g. if my vectors are:</p>
  
  <pre><code>(b,v,p)
  (1,4,2)
  (0,82,0)
  (55,1,0)
  (0,81,0)
  (2,30,0)
  </code></pre>
  
  <p>Then I want to sort as follows:</p>
  
  <pre><code>(b,v,p)
  (0,81,0)
  (0,82,0)
  (1,4,2)
  (2,30,0)
  (55,1,0)
  </code></pre>
  
  <p>Also my vector bvpVec is large, so it will be add on if anyone can suggest any sorting procedure which is faster than std::sort() for my case.</p>