摘要:
#include // cout #include // copy_if, distance #include // vector using namespace std; int main () { vector foo = {25,15,5,-5,-15}; vector bar (foo.size()); // copy... 阅读全文
摘要:
#include // cout #include // copy_backward #include // vector using namespace std; int main () { vector myvector; // set some values: for (int i=1; i::iterator it=m... 阅读全文
摘要:
#include // cout #include // copy #include // vector using namespace std; int main () { int myints[]={10,20,30,40,50,60,70}; vector myvector (7); copy ( myints, myi... 阅读全文
摘要:
#include // cout #include // adjacent_find #include // vector using namespace std; bool myfunction (int i, int j) { return (i==j); } int main () { int myints[] = {5,5,20,30... 阅读全文
摘要:
#include // cout #include // binary_search, sort #include // vector using namespace std; bool myfunction (int i,int j) { return (i v(myints,myints+9); // 1 2... 阅读全文
摘要:
#include // std::cout #include // std::any_of #include // std::array using namespace std; int main () { array foo = {0,1,-1,3,-3,5,-5}; if ( any_of(foo.begin(), foo.en... 阅读全文
摘要:
#include // std::cout #include // std::all_of #include // std::array using namespace std; int main () { array foo = {3,4,7,11,13,17,19,23}; if ( all_of(foo.begin(), fo... 阅读全文