title: error: use of deleted function ‘pQueue::pQueue(const pQueue&)’ note: <func> is implicitly deleted because the default definition would be ill-formed
body: <p>I'm new to c++ and am encountering this error while building the code. Found some answers online but am unable to understand them. Can someone please explain what this error means and how to resolve it in simple terms?</p>
  <p>For reference, I'm attaching the code snippets. These snippets are part of a project, so might miss out on a few details.</p>
  <p>file.cpp</p>
  <pre><code>#include &quot;File.h&quot;
  using namespace std;
  
  pQueue::pQueue()
  {
    std::priority_queue&lt;std::pair&lt;int, Category*&gt;&gt; q;
  }
  
  pQueue::~pQueue()
  {
  }
  
  void queueWork(std::priority_queue&lt;std::pair&lt;int, Category*&gt;&gt; q, int action, Category* data)
  {
    q.emplace(make_pair(action, data));
  }
  
  void doWork(std::priority_queue&lt;std::pair&lt;int, Category*&gt;&gt; q)
  {
    while (true)
    {
      std::pair&lt;int, Category*&gt; queueElement;
      queueElement = q.top();
      Category* data = queueElement.second;
      // Perform some operation, get return value
      q.pop();
    }
  }
  </code></pre>
  <p>file.h</p>
  <pre><code>#pragma once
  #include &lt;queue&gt;
  #include &lt;thread&gt;
  
  class pQueue
  {
  public:
    pQueue();
    ~pQueue();
  
   void queueWork(std::priority_queue&lt;std::pair&lt;int, Category*&gt;&gt; q, int action, Category* data);
  
  private:
    void doWork(std::priority_queue&lt;std::pair&lt;int, Category*&gt;&gt; q);
  };
  </code></pre>
  <p>main.cpp</p>
  <pre><code>#include &quot;File.h&quot;
  bool function(Category* data)
  {
      if (data)
      {
          // Will set action values later
          auto action = 1;
          pQueue::queueWork(Queue, action, data);
  
          // TODO: Implement getResult function to get the return value
      }
      return true;
  }
  </code></pre>