redspider
October 7th, 2005, 12:39 AM
Need help with random thread numbers.
I have a function that makes threads , the number of threads depends on user input.
So i need to have the right amount of HANDLE's for the threads, but the amount needs to be a const int eg.
const int threads = 5;
DWORD dwThreadId[threads];
HANDLE hThread[threads];
So is it ok to use
int thread_s = (user input from sonsole);
const int threads = sizeof(thread_s) / sizeof(int);
DWORD dwThreadId[threads];
HANDLE hThread[threads];
I have a function that makes threads , the number of threads depends on user input.
So i need to have the right amount of HANDLE's for the threads, but the amount needs to be a const int eg.
const int threads = 5;
DWORD dwThreadId[threads];
HANDLE hThread[threads];
So is it ok to use
int thread_s = (user input from sonsole);
const int threads = sizeof(thread_s) / sizeof(int);
DWORD dwThreadId[threads];
HANDLE hThread[threads];