At run time, how can I create a thread ?
I will take # of thread from standard input–terminal– then I will create thread according to this number. But, How ?
Ex:
input : N, N is integer
in main function
create N thread
EDIT : platform Linux
Yes, threads (if we assume that we are using pthreads) are created with the call pthread_create, and you can call that from a loop.
Here is the start of a C function that creates N threads: