我正在编写我的节点和列表类,一切正常,除非我在列表类中包含析构函数、复制构造函数和赋值运算符函数,而且我不知道它们有什么问题或者我错过了什么不包括.
linklist::linklist()
    :firstNode(NULL),
    lastNode(NULL),
    nodeCount(0) {}
linklist::~linklist()// destructor
{
    node* current = firstNode;
    while( current != 0 ) {
        node* temp = current->getNextNode();
        delete current;
        current = temp;
    }
    firstNode = 0;
}
linklist::linklist(linklist &L)// copy constructor
{
    firstNode = NULL;
    nodeCount = 0;
    node* temp = L.firstNode;
    for(int i = 0; i < L.getNodeCount(); i++)
    {
        push_back(temp);
        temp = temp->getNextNode();
    }
}
linklist& linklist::operator=(const linklist& L)// overloading assignemnt operator
{
    linklist* LL;
    node* temp = L.firstNode;
    while( temp != NULL ) {
        LL->getLast();
        temp = temp -> getNextNode();
    }
    return *LL;
}