通过函数指针创建线程 // 通过函数指针创建线程 #include <iostream> #include <thread> void counter(int id, int num_iterations) { for (int i = 0;<