Quantcast
Channel: Multithreading in c++ - Stack Overflow
Viewing all articles
Browse latest Browse all 7

Multithreading in c++

$
0
0

I want to run one function with different parameters on different threads:

int threads = 3;int par1[] = {1, 2, 3};int par2[] = {4, 5, 6};for (int i=0; i<threads; i++){  //new_thread function(par1[i], par2[i]);}

I know nothing about threads. I tried to do something the windows API (can't use other libraries), but it doesn't work. How should I implement this? And it is possible to start an unknown number of threads of the time of programming (dynamically creating threads)?


Viewing all articles
Browse latest Browse all 7

Latest Images

Trending Articles





Latest Images