command
Yes, it's possible, use map<string, boost::function<void()> >. void quit(); struct X { void set_visible(bool visible); }; X x; std::map< std::string, boost::function<void()> > commands; int main() { commands["quit"] = &quit; commands["show"] = boost::bind(&X::set_visible, &x, true); commands["hide"] = boost::bind(&X::set_visible, &x, false); }