Publisher review:Get the number of elements in an array - The old way was to take the size of the entire array and divide it by the size of a single element. The old way was to take the size of the entire array and divide it by the size of a single element.
With templates, you can convert an array of T to an array of char, and the size of the array of char gives you the number of elements! The result is intuitive and really neat.
Get the number of elements in an array is a C/C++ script for Snippets scripts design by Voodoo Doll.
It runs on following operating system: Windows / Linux / BSD / Solaris.
Operating system:Windows / Linux / BSD / Solaris