看板 EE_DSnP 關於我們 聯絡資訊
※ 引述《victoret (戲言~)》之銘言: : 在 moveToHistory、addHistory、retrieveHistory 三個的 comment 裡面都有提及 : _historySize 這個數值 : 然而在 cmdParser.h 裡面並沒有這一項 data member... : 在教授已經給的 retrieveHistory 裡面也沒有看到 _historySize : Comment 裡卻有提到這個數值在 moveToHistory 和 retrieveHistory 裡是不能被更動的 : 想請問一下這個變數是??? : 謝謝! 啊! 典型的改了 code 忘記 update comments... 基本上你都可以忽略他們。細節如下: 1. In "CmdParser::moveToHistory()" ==> Ignore the comments "The _historySize should NOT be changed." and "_history.size() is now > _historySize" 2. In "CmdParser::addHistory()" ==> 原 comment: "This function adds the string in _readBuf to the _history[_historySize]" ==> 改: "This function adds the string in _readBuf to the _history. The size of _history may or may not change. Depending on whether there is a temp history string." 3. In "CmdParser::retrieveHistory()" ==> 改: "Do not change _history.size()" -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 1.160.25.115
victoret:感謝教授! 10/09 10:32