More on Getting the Number of Array Elements

In a previous post, I discussed a safer way to get the number of elements in a C++ array.  I mentioned that the countof() macro doesn’t work with local types (i.e. types defined inside a function definition).   I just realized that the macro also fails to work with anonymous types under certain circumstances.  To…

3