Macro expansion across multiple files

OK, while the compiler is working on your *.cpp file, this:

extern const char *contestExchanges[];

tells it that there’s an array of char * out there “somewhere”. That’s all it needs for now to create object code that accesses the array. The linker will get things hooked up later.

However, it has no way of knowing how many elements are in the array. That’s only known to the compiler while it’s working on the file were the array is defined (i.e. in the *.ino file where storage is allocated).