📄 ht_get_2.cc
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -