struct Node
{
int n;
Node* pNext;
}
void Reverse(Node* n, Node* pre, Node* p)
{
if(n->pNext!=NULL)
{
Reverse(n->pNext, n, p);
}
else if(n->pNext==NULL)
{
p = n;
}
n->pNext = pre;
}
void Test()
{
Node* p = NULL;
......
Node* pNew = NULL; //逆向後結果
Reverse(p, NULL, pnew);
}