I'm working on a program with multiple source files to sort a large array of integers. The size of the array is #defined at the beginning of the main file, but the member functions are in another file. I don't want to have to #define it in both places or give my functions (or the class) an extra parameter for the array size - I'd rather have a way to calculate how many elements are in the array. Basically, I want in c++ what a.length does in java. Is this possible?