First page Back Continue Last page Graphics
#include <iostream>
- #include <iostream>
- #include <list>
- #include <algorithm>
- #include “print.hpp”
- using namespace std;
- // function object that adds the value with
- // which it is initialized
- class AddValue {
- private:
- int theValue; // the value to add
- public:
- AddValue(int) : theValue (v) { }
- void operator( ) (int & elem) const {
- elem += theValue;
- }
- };