Re: 請問STL的string這樣寫有錯誤嗎?

看板Programming作者 (殺人貓™)時間18年前 (2006/08/17 23:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/6 (看更多)
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
文章代碼(AID): #14v8mPsq (Programming)
文章代碼(AID): #14v8mPsq (Programming)