作者noblebell (高貴的鈴)
看板EE_DSnP
標題[問題] calcModNum.h中第二個constrctor的功能
時間Sun Nov 8 15:08:50 2009
在calcModNum.h中,class有兩個constructor其中一個如下:
// Get the ModNum from the _varMap based on the string "str".
// If found, copy the value.
// If not found, create a default one and insert to the _varMap.
ModNum(const string& str) { _num = _varMap[str]._num; }
敘述中有not found的情形,可是這裡沒有TODO,請問是漏打了嗎?
或是上述程式碼已有包含not found情況?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.251.6
1F:推 ric2k1:已有包含not found情況, please see [] operator for map 11/08 15:15
2F:→ noblebell:原來如此!謝謝教授。 11/08 15:21
3F:推 anfranion:如果只能動有存在的 就要先find他~ 11/08 15:38