#include <thread>
#include <iostream>
#include <vector>

using namespace std;

const int N = 10;

void hello(int i)
{
	cout << "Hello from thread " << i << endl;
}

int main() {
	vector<thread> thr;

	for (int i = 0; i < N; ++i){
		thr.push_back(thread(hello, i));
	}

	for (int i = 0; i < thr.size(); ++i){
		thr[i].join();
	}

	return 0;
}

