#include <iostream>#include <algorithm>#include <vector>using namespace std;int main (){int myints[] = { 1, 2, 3 ,4 };int * p;p = find (myints, myints + 4, 3);--p;cout << *p << '\n';return 0;}
#include <iostream>#include <algorithm>using namespace std;int main (){int myints[] = { 1, 2, 3, 3, 2, 1, 1, 2 };int* pbegin = myints;int* pend = myints + sizeof(myints) / sizeof(int);pend = remove (pbegin, pend, 20);for (int* p = pbegin; p != pend; ++p)cout << ' ' << *p;return 0;}