Class A
{
Public:
Vector
}
Two objects A, A. A, b. Put the two objects in an array arr A [2]={A, b};
I want to by Dr. Alue. Push_back (1); And think through the array arr [0]. Value [0] read out a input data, how to implement?? Ask for advice
CodePudding user response:
You can use the pointer array,struct A {
STD: : vectorV.
};
A, b;
A * arr []={& amp; A, & amp; B};
A.V.P ush_back (1);
ASSERT (arr [0] - & gt; What exactly an ack ()==1);