Delete [] difficulty in understanding where the error
<p>Sorry, this should nt have been asked. I realised that the error was due to my wrong understanding of DELETE operator. I thought whe you want to free something, you just write
delete [] var_name.....
i did not know about delete varname;
Apologies for wasting a lot of your time! 
Thanks a lot for getting me on the right track by figuring out myself! :)</p>

<p>I was deleting all the elements from link-list. Somehow I am not understanding why Segmentation Fault?
I did debug the code, 
the control comes to :  delete [] current; and then it gets stuck.</p>

<p>when I am deleting current, after that I am not getting why the fault?</p>

<pre><code>class ListOfParts
{
private:
    int size;
    struct CarPart {
        int partNumber;
        string partName;
        double unitPrice;
        CarPart* Next;
    };
    CarPart* Head;

public:
    bool deleteList() {
         deleteList1(Head);
    }
private:
    //DELETE:
    void deleteList1(CarPart*&amp; head) {
        CarPart* current = head;
        CarPart* next = current;

        while(current != NULL) {
            next = current-&gt;Next;
                    delete [] current;
            CarPart* current = new CarPart;
            current = next;
            size--;
        }

        cout &lt;&lt; "SIZE" &lt;&lt; size;
    }
};
</code></pre>
