I have a C++ array declared as mentioned below:
CString carray[] = { \"A\", \"B\", \"C\", \"D\", \"E\" }
The best way is to use a macro and use that where ever you want the size.
#define MAX_ROWS 1048 int array[MAX_ROWS];
This way you can use the MAX_ROWS even in a function where the array is passed as an argument.