Derek
By: a guest | Feb 9th, 2010 | Syntax:
C++ | Size: 0.31 KB | Hits: 12 | Expires: Never
template<class T>
void SAList<T>::insert(const T& data)
{
Node<T> *add;
Node<T> *temp;
add=new Node<T>(data);
if(head==NULL)
{
head = add;
}
else
{
temp = head;
head = add;
head->next_ = temp;
temp->prev_ = head;
}
}