📄 wrd_cstr_4.cc
字号:
// file: wrd_cstr_4.cc// // isip include files//#include "word.h"#include "word_constants.h" // method: constructor//// arguments:// Word& word : (input) the word to be copied//// return: none//// this is the copy constructor//Word:: Word(Word& word_a) { // set the word index // index_d = word_a.index_d; // set the word name // name_d = new char_1[strlen((char*)word_a.name_d) + (int_4)1]; strcpy((char*)name_d, (char*)word_a.name_d); // assign the number of pronunciations // num_prons_d = word_a.num_prons_d; // 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] = word_a.num_phones_d[i]; phone_list_d[i] = new int_4[num_phones_d[i]]; memcpy(phone_list_d[i], word_a.phone_list_d[i], num_phones_d[i] * sizeof(int_4)); } // copy the status flag // active_d = word_a.active_d; // exit gracefully //}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -