老师写的while(currentNode->next != 0),那如果定位的数据在尾节点怎么办?是尾节点不用存数据吗?
currentNode就是尾节点,所以currentNode->next 就为NULL了,后面没有节点了
当循环到尾节点前一个节点时,循环体中有currentNode=currentNode->next,即对尾节点进行操作