tr_ll_stack_1.cc

来自「这是处理语音信号的程序」· CC 代码 · 共 44 行

CC
44
字号
// file: tr_ll_stack_1.cc//// isip include files//#include "train_link_list.h"#include "train_link_list_constants.h"// method: pop_cc//// arguments: none//// return: a Train_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//Train_Link_node* Train_Link_list::pop_cc() {  // dummy variable  //  Train_Link_node* node = head_d;  // remove the head node and move the links up  //  if (head_d != (Train_Link_node*)NULL) {    head_d = head_d->get_next_cc();    node->set_next_cc((Train_Link_node*)NULL);  }  // check if there are any nodes left  //  if (head_d != (Train_Link_node*)NULL) {    head_d->set_prev_cc((Train_Link_node*)NULL);  }  else {    curr_d = head_d;  }    // return node and exit gracefully  //  return node;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?