Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nitrogen
on May 13, 2019
|
parent
|
context
|
favorite
| on:
F() vs. F(void) in C vs. C++
You can approximate an argument list using compound literals as long as 0/NULL is an acceptable default value. It's a bit noisy, but it works something like this if I remember right:
result = foo(&(struct foo_args){.arg1 = 4, .arg7 = "2"})
ndesaulniers
on May 13, 2019
[–]
http://nickdesaulniers.github.io/blog/2013/07/25/designated-...
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: