9
struct sample {
int x;
int y;
int arr[10];
};
int arr2[10] = {0, 1, 2, 4, 3, 2, 2, 1, 5, 5};
int a = 19;
int b = 22;
struct sample* samp = new sample;
samp->x = a;
samp->y = b;
samp->arr = ??
In the above example, I need to initialize array inside the structure arr[10] with the elements of arr2[10].
How to do it in C++??