title: How to spawn multiple threads that call same function using std::thread C++
body: <p>Basically what I would like to do is write a for loop that spawns multiple threads. The threads must call a certain function multiple times. So in other words I need each thread to call the same function on different objects. How can I do this using std::thread c++ library?</p>