查询数组中元素的个数
作者定义了一个查询数组个数的宏:
/*
** A convenience macro that returns thenumber of elements in
** an array.
*/
#define ArraySize(X) ((int)(sizeof(X)/sizeof(X[0])))
时间: 2024-10-16 13:14:24
作者定义了一个查询数组个数的宏:
/*
** A convenience macro that returns thenumber of elements in
** an array.
*/
#define ArraySize(X) ((int)(sizeof(X)/sizeof(X[0])))