With this code:
struct Structure {
int a;
char b[4];
};
void function() {
int a = 3;
char b[] = {'a', 'b', 'c', 'd'};
}
Can I initialize Structure
with the values of a
and b
using aggregate initialization?
I tried Structure{a, b}
, however that gives me the error cannot initialize an array element of type 'char' with an lvalue of type 'char [4]'