I would like to initilize some elements of an struct and array in C++.
In C you can do:
unsigned char array[30] = {[1] = 4, [20] = 4};
struct mystruct
{ int i;
int j;
}
struct mystruct e = {.j = 2};
But I cannot do it in C++. Is there any way to implement this kind of designated initializers?