作者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