class A{
int a;
public:
A(int i){
a=i;
}
};
class B{
int b;
A *arrA;
public:
B(int n){
b=n;
arrA=new A[n];
}
};
Now, I want to send 'n' to the constructor of all objects of A being created using 'new' in B. How can I do it?