I want to learn how to create multiple threads with the new C++ standard library and store their handles into an array. How can I start a thread? The examples that I saw
Nothing fancy required; just use assignment. Inside your loop, write
myThreads[i] = std::thread(exec, i);
and it should work.