Hacker News new | past | comments | ask | show | jobs | submit login

C99 has compound literals which allows you to call functions that take struct values or pointers to structs like this:

    my_func((my_type){ .x = 1, .y = 2 });

    my_func(&(my_type){ .x = 1, .y = 2 });



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: