#include #include template int apply(const list & l, const C& fct) { typedef list::const_iterator const_iterator; ... } struct Plus { int operator()(int r, int x) const { ... } }; struct Mult { int operator()(int r, int x) const { ... } }; int main() { int n, s; list l; cin>> n; for(int i=0;i>s;l.push_back(s); } cout <<"Plus: "<