In an application I'm developing, I have a class with functions which refer to specific instances of the same class.

I'll post this example - the actual code is hideously long.

Code:
Class myClass {
//never mind constructors and destructors, they aren't relevant here
public:
void SelfRefer();
int Foo;

};

myClass Billy[2];

void myClass::Selfrefer() {
Billy[1].Foo=3;
}
As you can see, all instances of myClass refer to a specific instance of myClass (which I know will exist). The only way this code works is because I've put the instance Billy after the class itself but before the functions.

I need to be able to declare instances of myClass in other places, like in the following example (which won't compile).

Code:
Class myClass {
//never mind constructors and destructors, they aren't relevant here
public:
void SelfRefer();
int Foo;

};

void myClass::Selfrefer() {
Billy[1].Foo=3;
}

myClass Billy[2];
What can I do? The instances can't be declared before the class itself is, but if they're declared afterwards they won't "exist yet" in the eyes of the class's Selfrefer() function, producing an error (along the lines of "Billy[] not declared" or something).

Thanks in advance.