templatevoid ListTemp ::AddTail(const T& newData) { //please implement this Node* temp = new Node; Node* current = head; temp->data = newData; temp->next = NULL; if (head == NULL) { head = temp; } else { while (current -> next != NULL) { current = current->next; } current->next = temp; } size++; }
以上内容是在ListTemp.h中添加AddTail()函数。



