Assume I declare an array in the class header file:
class A{
private:
int a[3];
};
Then I try to initialize it in constructor. It seems I can only assign value to the array element by element like:
A::A()
{
a[0] =1;
a[1] =3;
a[2] =7;
}
Is there any better approaches to initialize the array>
Thanks in advance.