try this
class Parent{ string p;public: Parent(string x):p(x){} void operator()(){ cout << p << "thread called." << endl; Child c1("I am child 1"); boost::thread c1t(c1);
}};