Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on To become a good C programmer (2011). Parent comment
I really like the idiom for passing sized arrays suggested at the end of that LKML thread[1]: pass them by reference!
void func(int (*arr)[256]) { printf("arr size: %ld\n", sizeof(*arr)); } int main(void) { int array[256]; func(&array); }
There are no comments on this comment yet.
I really like the idiom for passing sized arrays suggested at the end of that LKML thread[1]: pass them by reference!
[1] https://lkml.org/lkml/2015/9/7/147