Assume this code:
#include <iostream>
struct test {
int a[3];
float b[2];
};
I can init the array in both these ways:
int main(){
test t = {{1,2,3}, {1.0,2.0}};
return 0;
}
or
int main(){
test t = {1, 2, 3, 1.0, 2.0};
return 0;
}
How is the second approach even compiling? is the compiler picking each value and putting in an array slot in order?