I am adjusting existing code and want to avoid renaming variables, etc. I have defined value in one struct[] and want to assign its value to another struct[].
Simplified example. I have:
static const struct {
int xyz;
} var1[] = { {1}, {2}, {3} };
And what I want to do would look somewhat like this:
static const struct {
int xyz;
} var2[] = var1;
[...]
if (var2[1].xyz === 1) {
[...]
}
Basically I need to alias/point to/copy struct[] using another struct[].
Any ideas?