title: Queue of Nodes (Linked-list) C++
body: <p>I'm trying to store Nodes in a queue (STL), but I'm getting an error.</p>
  
  <p>First of all, I want to know if the struct of the Node is right.</p>
  
  <p>Really, I want to store the Nodes in order of integers (small to big), I heard of the priority queue, I tried to use it, but I was getting a big error so I went back to a queue.</p>
  
  <p>Then I saw something about operator overloading of the Nodes but I don't re4ally geting how to use that. Will have have to make a Node.h file?</p>
  
  <pre><code>struct Node{
    int freq;
    char Char;
    struct Node *left;
    struct Node *right;
    Node(int freq, char Char){
    freq = freq;
    Char = Char;
   }
  };
  
  queue&lt;Node*&gt; list;
  Node *a = new Node(2, '4');
  
  list.push(a);
  
  Node *e = list.pop();
  cout &lt;&lt; e-&gt;freq;
  </code></pre>
  
  <p>ERROR:</p>
  
  <pre><code>error: void value not ignored as it ought to be // Node *e = list.pop();
  </code></pre>