void LRUCache::show(){ //链表中没有节点,退出 if(head_node->next = head_node){ return; } Node* tmp = head_node->next; while(tmp->next != head_node){ std::cout<<"key:"<<tmp->key<<",vlaue:"<<tmp->value<<std::endl; } } 这里的while循环是不是有点问题啊,条件应该是tmp!=head_node,里面应该加一句tmp=tmp->next?