作者Killercat (杀人猫™)
站内Programming
标题Re: 请问STL的string这样写有错误吗?
时间Thu Aug 17 23:34:29 2006
template<class InputIterator, class Type>
InputIterator find(
InputIterator _First,
InputIterator _Last,
const Type& _Val
);
Parameters
_First
An input iterator addressing the position of the first element in the range
to be searched for the specified value.
_Last
An input iterator addressing the position one past the final element in the
range to be searched for the specified value.
_Val
The value to be searched for.
Return Value
An input iterator addressing the first occurrence of the specified value in
the range being searched.
If no such value exists in the range, the iterator
returned addresses the last position of the range, one past the final element.
(这个基本上跟.end()的定义相同)
我比较不明白的是, .end()跟string::npos应该不会是一样的直吧 +_+
不过我似乎也有string::npos当传回值的印象...?
请问这大概是...?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.163.161.9