[問題] C++ Primer 3/e中文版

看板Programming作者 (傲天祥雲)時間18年前 (2007/03/09 18:21), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
P.591 int ires; string sval1; vector<string> svec; //... ires = count_if(svec.begin(), svec.end(), equal_to<string>(), sval1); 但SGI的版本是 template <class InputIterator, class Predicate> iterator_traits<InputIterator>::difference_type count_if(InputIterator first, InputIterator last, Predicate pred); template <class InputIterator, class Predicate, class Size> void count_if(InputIterator first, InputIterator last, Predicate pred, Size& n); 第四個參數型別也不一樣 而具我所查到的資料 ires = count_if(svec.begin(), svec.end(), bind2nd(equal_to<string>(), sval1)); 請高手解答疑惑@@ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.59.83.198 linbaskenny:轉錄至看板 C_and_CPP 03/09 22:34
文章代碼(AID): #15yJKd-K (Programming)
文章代碼(AID): #15yJKd-K (Programming)