First, as a rule, it's not as helpful to write
Error conversion from FatCase** to ... |
when you could easily publishe the full error and indicate what line number it occurred on.
Second, if you use variables in presenting a problem, it's often helpful to show the type. It saves a lot of guessing on the reader's part.
Have you thought about the layout of your 2D array? It's not really a 2D array at all it's an array of array pointers, so the memory layout isn't contiguous. It's a similar layout to
argv
that's passed into
main
. So
fc
isn't the same as
&fc[0][0]
.
Having said that, it should be clear that you need to pass
fc
to pthread_create.
There's also the general point that you shouldn't be using thread functions, but thread classes. As you've discovered, a thread often needs "stuff" to work with. Without careful management, the thread's stuff get's mixed with the other stuff and it gets confusin very quickly. If you use a thread class, you contain the stuff lying around and it get's declared where it's needed. In your case, the stuff is your 2D array. But this has no direct bearing on the problem at hand.