title: Sorting a Queue of Structs
body: <p>I currently have a queue that holds a user specified number of structs called <strong>Process</strong>.  Process is made up of a pid, burst, and arrival.  I would like to sort the queue by arrival, but I don't have the faintest idea of where to begin.  Here is some pseudocode to help illustrate what I'm trying to say:</p>
  
  <pre><code>struct Process{
      int pid;
      int burst;
      int arrival;
  };
  
  void function(int numProcesses){
      queue&lt;Process&gt; readyQueue;
  
      // The following loop is a shortened version of my code
      for(int i=0; i&lt;numProcesses;i++){
          readyQueue.push(aProcess);
      }
  
      // This is where I need help!
      // sort(readyQueue);
  }
  </code></pre>
  
  <p>I'd be appreciative of anyone who could point me in right direction on how to do this, or if it is even possible.  Thanks!</p>