I am trying to access an array of class instances from two source files, was hoping you could point me in the right direction. Here's roughly what I have so far.
//X.h
extern Object myObj[5];
//A.cpp
#include X.h
Object myObj[5];
myObj[0].doSomething();
...
myObj[4].doSomething();
//B.cpp
#include X.h
Object myObj[5];
myObj[0].doSomethingElse();
...
myObj[4].doSomethingElse();
I have entirely no idea if I am along the right lines. Even a phrase or two for me to google would be much appreciated.