title: Passing in a Priority Queue by reference
body: <p>I have a vector of priority queues of Objects with a custom comparator in my main.cpp. I have multiple functions that need the priority queue and which should modify the priority queue. What is the correct way to go about passing in a priority queue by reference? Would it be using pointers? I am extremely confused about how to go about this. </p>
  
  <p>In my main I declare my priority queue like:
  The type is of Order 
  <code>vector&lt;priority_queue&lt;Order, vector&lt;Order&gt;, compLower&gt; &gt;  buy_orders (num_equities);</code></p>
  
  <p>I call a function makeTransaction which only deal with the individual priority queues:</p>
  
  <p><code>makeTransaction(equity_id, buy_orders[equity_id]);</code></p>
  
  <p>However, when I call this function and later try to access <code>buy_orders</code>, nothing changes. How can I pass it by reference so <code>makeTransaction</code> can make the necessary changes to <code>buy_orders</code>?</p>
  
  <p>Also, how would I appropriately declare the makeTransaction function?</p>