Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
nitrogen
12y ago
0 comments
Save
Share
Yes, 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.
0 comments
2 comments · 1 top-level
top
newest
oldest
mtdewcmu
12y ago
· 1 in thread
That's interesting. You know you can pass structs by value, too, so I'm not sure how necessary it is to take the address.
nitrogen
OP
12y ago
It can be useful for an API that expects pointers for whatever reason.
j
/
k
navigate · click thread line to collapse