3 ms·
You can take the address of a literal? Being able to specify a literal for a struct is useful. You can, for instance, put the literal in a macro and use the ma
by mtdewcmu 12y ago
You can take the address of a literal?
Being able to specify a literal for a struct is useful. You can, for instance, put the literal in a macro and use the macro to initialize or reset a struct. It's better than having to write additional functions to do something trivial.
- nitrogen 12y agoYes, you can. You can use it to create an approximation of named parameters, because struct members that don't have an initializer will default to zero. It's still not nearly as compact as, say, Ruby, but for C it's pretty awesome and fast.