#include <iostream>
#include <boost/chrono.hpp>
#include <boost/thread.hpp>
using namespace boost;
using namespace std;

void mw (int tid){
	cout <<"hello from thread [" <<tid <<"]" <<endl;
	while (true){
		this_thread::sleep_for(boost::chrono::milliseconds(500));
		cout << "[" <<tid << "]" <<endl;
		}
	}

int main(void){
	int n=0;
	int count=1;
	thread_group *tg=new thread_group();
	cout << "give n" <<endl;
	cin>> n;
	for (int i=0; i<n; i++, count++){
		tg->add_thread(new thread(mw,count));
		}
	tg->join_all();




return 0;
}
