c++ clear array to zero code example
Example 1: c++ initialise array
int nCount[] = {1, 2, 3, 4, 5};
Example 2: c++ initialize array
int arr[3] = {1, 5, 4};
Example 3: reset c array to zero
#define ZERO(a,n) do{\
size_t i_ = 0, n_ = (n);\
while (i_ < n_){\
(a)[i_] = 0;\
++i_;\
}\
} while (0)