// Demonstrating the generic find algorithm with a deque
#include
#include
#include
#include // For find
using namespace std;
int main()
{
int x[5] = {1, 2, 3, 4, 5};
deque deque1(&x[0], &x[5]);
// Search for the first occurrence of the letter e:
deque::iterator i;
cout.precision(10);
for (i = deque1.begin(); i != deque1.end(); ++i)
cout << *i << endl;
return 0;
}
1
2
3
4
5