📄 ll_stack_1.cc
字号:
// file: ll_stack_1.cc//// isip include files//#include "link_list.h"#include "link_list_constants.h"// method: pop_cc//// arguments: none//// return: a Link_node* containing the head of the list//// this method removes and returns the node at the head of the linked// list and connects the list accordingly//Link_node* Link_list::pop_cc() { // dummy variable // Link_node* node = head_d; // remove the head node and move the links up // if (head_d != (Link_node*)NULL) { head_d = head_d->get_next_cc(); node->set_next_cc((Link_node*)NULL); } // check if there are any nodes left // if (head_d != (Link_node*)NULL) { head_d->set_prev_cc((Link_node*)NULL); } else { curr_d = head_d; } // return node and exit gracefully // return node;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -