delete data from linked list
<p>I'm trying to delete from a linked list. But it doesn't seems to be working if i try to delete the first element.</p>

<pre><code>if (found)
{
    if (prev == NULL)
    {
        prev = head;
        prev -&gt; next = curr -&gt; next;
        delete curr;
    }
    else
    {
        prev -&gt; next = curr -&gt; next;
        delete curr;
    }
}

return found;
</code></pre>

<p>The findNode functions works if i were to delete from somewhere in the middle or from the tail. But i figured out that if i delete from the tail, i've have to set the next to NULL, am i right?</p>
