I'm using a threading library given to me at school and having trouble understanding how to pass a reference of an array of pointers to a method, or rather, I'm having trouble de-referencing and using the pointer array.
The situation that I (believe I) understand is this:
int main(void)
{
    Foo* bar = new Foo();
    // Passing instance of Foo pointer by reference 
    CThread *myThread = new CThread(MyFunction, ACTIVE, &bar);
    return 0;
}
UINT __stdcall MyFunction(void *arg)
{
    Foo* bar = *(Foo*)(arg); 
    return 0;
}
I'm creating a pointer to a Foo object and passing it by reference to a thread running MyFunction, which accepts a void pointer as its argument. MyFunction then casts "arg" to a Foo pointer and de-references it to get the original object.
My problem arises when I want to pass an array of Foo pointers instead of just one:
int main(void)
{
    Foo* barGroup[3] = 
    {
        new Foo(),
        new Foo(),
        new Foo()
    };
    // Passing instance of Foo pointer by reference 
    CThread *myThread = new CThread(MyFunction, ACTIVE, &barGroup);
    return 0;
}
UINT __stdcall MyFunction(void *arg)
{
    // This is wrong; how do I do this??
    Foo* barGroup[3] = *(Foo[]*)(arg); 
    return 0;
}
 
    