calling a function from another class in a thread c++ code example Example: thread c++ member function myThreads[i] = std::thread(&Car::start, myCar);