看板 EE_DSnP 關於我們 聯絡資訊
CmdExec::lexOptions 這個function好像已經被包起來了 根據hw3 它的prototype是 bool CmdExec::lexOptions (const string& option, vector<string>& tokens, size_t nOpts) const 裡面有三個parameter 但是我看到老師給的code裡面卻這樣用: CmdExec::lexOptions(option, options); //只給兩個parameter (在hw3的calcCmd.cpp裡面,MprintCmd::exec底下) 我覺得compile應該不會過...... (抱歉拿冷飯出來炒,因為寫Cmd.cpp要用......) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.175.14
ric2k1:// if nOpts is specified (!= 0), the number of tokens 06/24 17:13
ric2k1:must be exactly = nOpts 06/24 17:13
ric2k1:// Otherwise, return false. 06/24 17:14
old000:那...為什麼parameter數量不對 compile也會過呢? 06/24 17:19
timrau:default parameters... 06/24 17:21
old000:喔喔 我看到了 謝謝!!! 06/24 17:35