1 #include "algostuff.hpp"
2 using namespace std;
3
4 bool bothEvenOrOdd (int elem1, int elem2)
5 {
6 return elem1 % 2 == elem2 % 2;
7 }
8
9 int main()
10 {
11 vector<int> coll1;
12 list<int> coll2;
13
14 float m = 40.0f;
15
16 INSERT_ELEMENTS(coll1,1,7);
17 INSERT_ELEMENTS(coll2,3,9);
18
19 PRINT_ELEMENTS(coll1,"coll1: \n");
20 PRINT_ELEMENTS(coll2,"coll2: \n");
21
22
23 if (equal (coll1.begin(), coll1.end(),
24 coll2.begin())) {
25 cout << "coll1 == coll2" << endl;
26 } TODO
27
28
29 if (equal (coll1.begin(), coll1.end(),
30 coll2.begin(),
31 bothEvenOrOdd)) {
32 cout << "even and odd elements correspond" << endl;
33 }
34 }