#include "master.h" // Constructor for Master class. master::Master::Master(int argc, char* argv[]) { a = 0; } // Method for printing a 100000 times. void master::Master::printmaster() { for(int i=0; i<=1000000; i++) { std::cerr << "Master: Value of a =" << a <<"\n"; } } //Method to create a thread void master::Master::createt(){ thread t1(sleepslave); } // Method for updating the master thread members void master::Master::sleepslave(){ std::cerr << "Slave thread Started"<createt(); master->printmaster(); std::cerr << "Master End...." << std::endl; return 0; }