the question says: define a container (possibly a template) of action objects (will be named Runner). Action Objects (AO) are objects that perform a user supplied function. The idea is that once an action container is loaded with AOs it can be asked to run or execute them. The results of the execution are returned in a Results array. example:
AO a1(mul, x, x); //if run method is called it returns x*x
AO a2(add, y, 1); //if run method is called it returns y+1
AO a3(print, s); //if run method is called it prints s on cout
Runner<AO> r = {a1,a2,a3};
so now int the runner class how should I implement a constructor that takes the constant array and knows it size
template<typename a>
class runner{
a* m;
int size;
public:
runner(const a x[]){
//how to know the size of x[] to initialize m=new a[size] and then fill it with a1,a2,a3 ??
}