4 ms·
[When we found that some programmers were simply not using pointers, we eliminated the ability to pass structures to functions, enforcing their use in even the
by Unklejoe 10y ago
[When we found that some programmers were simply not using pointers, we eliminated the ability to pass structures to functions, enforcing their use in even the simplest applications.]
I'm confused. You can pass a structure to a function by value in C. What does he mean by this?
- Someone 10y agoIn ANSI C, not in K&R C. https://en.wikipedia.org/wiki/C_(programming_language)#K.26R_C https://en.wikipedia.org/wiki/C_(programming_language)#K.26R... doesn't explicitly say it, but gets close: "In the years following the publication of K&R C, several features were added to the language [...] functions returning struct or union types (rather than pointers)"