no matching function for call to ‘find(std::vector::reverse_iter
寫例子時遇到的報錯
error: no matching function for call to ‘find(std::vector::reverse_iterator, std::vector::reverse_iterator, int)’ ? 45 | ? ? RevIter ri = find(v1.rbegin(), v1.rend(), 3);
原因:使用find函數(shù),需要包含algorithm的頭文件。
解決方法:在文件里加上#include<algorithm>即可。
=End=
標簽: