I can do this on initialization for a struct Foo:
Foo foo = {bunch, of, things, initialized};
but, I can\'t do this:
Foo f
If you don't care too much about efficiency, you could double assign: i.e. create a new instance of the structure using aggregate initialization, and then copy it over:
struct Foo foo; { struct Foo __tmp__ = {bunch, of, things, initialized}; foo = __tmp__; }
Make sure you keep the portion wrapped in {}s so as to discard the unnecessary temporary variable as soon as it's no longer necessary.
Note this isn't as efficient as making, e.g., a 'set' function in the struct (if c++) or out of the struct, accepting a struct pointer (if C). But if you need a quick, preferably temporary, alternative to writing element-by-element assignment, this might do.