// initializing complex structures at declaration // Mikhail Nesterenko // 10/18/2012 #include #include using std::string; // example structure struct example{ int a; string b; }; // second example structure whose member is a substructure struct compExample{ int d; example e; }; int main(){ compExample myStruct = {1, {2, "three"}}; example myStructArray[2] = {{1, "one"}, {2, "two"}}; }