I came across some code containing the following:
struct ABC { unsigned long array[MAX]; } abc;
When does it make sense to use a declaration like this?
It allows you to pass the array to a function by value, or get it returned by value from a function.
Structs can be passed by value, unlike arrays which decay to a pointer in these contexts.
1.4m articles
1.4m replys
5 comments
57.0k users