De-referencing void pointer to a pointer array
问题 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);