In C++ I am trying to initialize in my constructor an array of objects that their constructor takes one or more arguments. I want to do this on the initialization list of the constructor and not its body. Is this possible and how?
What I mean:
class A{
public:
A(int a){do something};
}
class B{
private:
A myA[N];
public:
B(int R): ???? {do something};
}
What should I put in the ??? to initialize the array myA with a parameter R?