作者XDucka (Duck)
看板EE_DSnP
標題[問題] hw2--moveToHistory
時間Mon Oct 15 00:16:46 2012
在hw2裡的CmdParser::moveToHistory(int index)
的註解
// Assign _historyIdx to index at the end.
//
// [Note] index should not = _historyIdx
為什麼要把_historyIdx的值assign給 index阿
這個fucntion不是call by value嗎
傳給index等到fuction結束他不就消失了
到底是要把index assign給_historyIdx
還是要用static的方法記住index勒
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.25.230.204
1F:推 ric2k1:我想是英文的表達有誤會... orz. 我的意思是: 10/15 00:33
2F:推 ric2k1:把 _historyIdx 設成 index 的值 XD // _historyIdx= index 10/15 00:34
3F:→ XDucka:XD 仔細想想也對欸XD 10/15 00:46