#include #include int main() { const int N = 2; std::thread threads[N]; for (auto& t: threads) t = std::thread([] { while (true) std::cout << "hola, soy " << std::this_thread::get_id() << std::endl; }); for (auto& t: threads) t.join(); }