ht_get_2.cc

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

CC
37
字号
// file: ht_get_2.cc//// isip include files//#include "hash_table.h"#include "hash_table_constants.h" // method: get_num_cells_cc//// arguments: none//// return: an integer giving the number of cells in the table//// this method gets the number of cells in the hash table//int_4 Hash_table::get_num_cells_cc() {  // declare local variables  //  int_4 num_items = 0;    // get cells of hash table and exit gracefully  //  for (int_4 i = 0; i < size_d; i++) {    Hash_cell* cell = cells_d[i];    while (cell != (Hash_cell*)NULL) {      num_items++;      cell = cell->get_next_cc();    }  }  // exit gracefully  //  return num_items;}

⌨️ 快捷键说明

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