I have declared 2 structure :
typedef struct { int a; int b; }ma_Struct; typedef struct { int x; ma_Struct tab[2]; }maStruct_2; The goal is to initialise an instance of maStruct_2 so what i did is:
int main() { ma_Struct elm1={0,1}; ma_Struct elm2={1,2}; ma_Struct tab_Elm[2]={elm1,elm2}; maStruct_2 maStruct_2_Instance={1,tab_Elm}; return 0; } but i got the warning missing braces around initializer,i tried this syntax
maStruct_2 maStruct_2_Instance={1,{tab_Elm}}; but the same warning appears. Could you please help me