Thanks for your reply and link (which I will try to follow).

However, I am trying to write a parallel program where I have a big array. Multiple (e.g. 2, 4, 8) threads do work on part of those arrays. Afterwards, they sort their portions of array and return the answer to main.

So, I have made global variable, which is shared array. I do not know if there is another way to tackle the problem.

When I don't use shared, the singleThreadFunction, which is executed by different threads, does not process the shared array. Thanks.

Reply via email to