I have a C++ array declared as mentioned below:
CString carray[] = { \"A\", \"B\", \"C\", \"D\", \"E\" }
Windows SDK (i.e. windows.h header) offers the macro ARRAYSIZE which implements this functionality in a safe manner(i.e. doesn't work with non-static arrays)