Good day, I began to learn the flow in the pros. Elementary has learned to do, but the question is how to make the function type a line to set the number of times by the example of code?
DWORD WINAPI Func1 (void * param,int size) // сайз { for (int i=0; i < size; i++) cout << "SWAG" <<endl; return 0; } // main HANDLE thread1=CreateThread(0,0,Func1,0,0,0); // как сюда кинуть параметр? Tell me please.
CreateThreadbe. one parameter . So, make a structure (it is better to allocate memory for it with malloc), fill it with the necessary parameters and pass its address. - avp