版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_40990854/article/details/82768275
template<class Type>
inline void Link<Type>::InverseLink()
{
Node<Type> * current = head;
Node<Type> * next = NULL;
Node<Type> * result = NULL;
while ( current )
{
next = current->next;
current->next = result;
result = current;
current = next;
}
head = result;
}