title: Make min priority queue of arrays c++
body: <p>I want a min priority queue which instead of containing integers, stores arrays. The priority of each element is the first element in the array.</p>
  
  <pre><code>priority_queue&lt;array&lt;int, 6&gt;, vector&lt;int&gt;, greater&lt;int&gt;&gt; pq;
  array&lt;int, 6&gt; arr = {a, b, c, d, e, f};
  pq.push(arr);
  array&lt;int, 6&gt; popArr = pq.pop();
  </code></pre>
  
  <p>When I do this I get the following error related to pushing:</p>
  
  <pre><code>no matching function for call to ‘std::priority_queue&lt;std::array&lt;int, 6&gt;, std::vector&lt;int&gt;, std::greater&lt;int&gt; &gt;::push(std::array&lt;int, 6&gt;&amp;)’
   pq.push(arr);
  </code></pre>
  
  <p>And the following related to popping:</p>
  
  <pre><code>conversion from ‘void’ to non-scalar type ‘std::array&lt;int, 6&gt;’ requested
   array&lt;int, 6&gt; popArr = pq.pop();
  </code></pre>
  
  <p>How can I fix these errors?</p>