MyClass.h
class MyClass
{
public:
static const int cTotalCars;
private:
int m_Cars[cTotalCars];
};
MyClass.cpp
It just can't works if you define size of the array is set in cpp file. All class clients should know the size of class instance but they just have no idea about .cpp file because you only put #include "MyClass.h" in client-files.
In other words - your class definition is varies depending on the cpp-file which is not used while compile files that uses MyClass.