The last Node of Link List
- 作者:xiaoxiao
- 发表时间:2020-12-23 11:03
- 来源:未知
The Last node should pointer to itself, as following:
Node *z = new Node;
z->Next = z;
That could display the records N rather than N+1.
The display condition should be written as:
while( t!=t->next ) { // do something // ...... }