2.7 Count |
This function returns the number of items currently in a table.
10. <Table count function prototype 10> = size_t tbl_count (const struct tbl_table *);
The actual tables instead use a macro for implementation.
Exercises:
1. Implement tbl_count() as a macro, on the assumption that struct tbl_table keeps the number of items in the table in a size_t member named tbl_count. [answer]