📄 ngrl_set_0.cc
字号:
// file: ngrl_set_0.cc//// isip include files//#include "ngram_list.h"#include "ngram_list_constants.h"// method: set_num_cc//// arguments:// int_4 num: (input) the number of nodes in the array//// return: a logical_1 indicating success//// this method sets the size of the nodes array and if needed,// reallocates memory//logical_1 Ngram_list::set_num_cc(int_4 num_a) { // set values // num_d = num_a; // check if array needs to be reset, too // if (nodes_d != (Ngram_node**)NULL) { delete [] nodes_d; } nodes_d = (Ngram_node**)NULL; // allocate memory if needed // if (num_d > (int_4)0) { // create array // nodes_d = new Ngram_node*[num_d]; // initialize // for (int_4 i = 0; i < num_d; i++) { nodes_d[i] = (Ngram_node*)NULL; } } // end if // exit gracefully // return ISIP_TRUE;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -