📄 wrd_phone_0.cc
字号:
// file: wrd_phone_0.cc// // isip include files//#include "word.h"#include "word_constants.h" // method: set_phone_list_cc//// arguments: none// int_4** phone_list_a : (input) pointer to the list of pronunciations// int_4* num_phones_a : (input) number of phones in the pronunciations// int_4 num_prons_a : (input) number of pronunciations of word//// return: a logical_1 indicating status//// this method sets the pronunciation parameters//logical_1 Word::set_phone_list_cc(int_4** phone_list_a, int_4* num_phones_a, int_4 num_prons_a) { // free existing memory // if (phone_list_d != (int_4**)NULL) { for (int_4 i = 0; i < num_prons_d; i++) { delete [] phone_list_d[i] ; } delete [] phone_list_d; } if (num_phones_d != (int_4*)NULL) { delete [] num_phones_d; } // assign the number of pronunciations // num_prons_d = num_prons_a; // copy the pronunciations // phone_list_d = new int_4*[num_prons_d]; num_phones_d = new int_4[num_prons_d]; for (int_4 i = 0; i < num_prons_d; i++) { num_phones_d[i] = num_phones_a[i]; phone_list_d[i] = new int_4[num_phones_d[i]]; memcpy(phone_list_d[i], phone_list_a[i], num_phones_d[i] * sizeof(int_4)); } // exit gracefully // return ISIP_TRUE;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -