⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 errors.txt

📁 ssd5 recommended exe2,答案绝对正确
💻 TXT
字号:
"string new_word_list = *(new string[2 * capacity]);" is wrong, I modify it to "string* new_word_list = new string[2 * capacity];" To keep the new_word_list beginning address, I add the line"string *p=new_word_list;" to call later.


"new_word_list = word_list[index];" is also wrong, it should be "*(new_word_list++) = word_list[index];"

"delete word_list" can just free the first element, it should be "delete[ ] word_list" to delete all.

After  copying all the elements, the pointer was moved to the end, so I add " word_list = p;" to modify "word_list" to point at the first element.


I move the print function into the function build_wordlist, because the pointer  transfered by value,  the pointer in the main function  is still point at NULL after the function build_wordlist calling.


"string *word_list;" causes a warning, because it hasn't been initialized. 

⌨️ 快捷键说明

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