title: How do I delete a node from linked list?
body: <p>How can I delete a node (between two nodes) from a single linked list without passing any parameters to the class function?  </p>
  
  <p>For example, I have a list of 6 nodes with one head node and I want to delete two of them (without prior knowledge of their address or position) from a class function, how would I do that?</p>
  
  <pre><code>void WordList::deleteNode(){
  Node *temp;
  temp=head;
  if(temp-&gt;count&lt;=10)
  {
  //delete this node... not sure how though
  }
  else
  temp=temp-&gt;next;
  }
  </code></pre>
  
  <p>where WordList is my class, Node is my struct which holds a word, a count, and a pointer.
  I want to delete any node that has a counter of 10 or less.</p>