C++ Structure Initialization
You need to use more braces (actually, they're optional, but GCC makes a warning these days). Here's an example:
struct s1 { int a; int b; };
struct s2 { int c; struct s1 s; };
struct s2 my_s2 = { 5, { 6, 3 } };
Nesting of structure
You can initialize a structure if one field in the structure is itself a structure
struct add{
int house;
char road;
};
struct emp{
int phone;
struct add a;
};
struct emp e = { 123456, 23, "abc"};
printf("%d %d %c",e.phone,e.a.house,e.a.road);