-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm trying to send a reference from a function to a function.
How can I pass function reference: "&WtApplication::upmTools" TO mM->itemSelected().connect(tthis, ffunc) inside function "WtApplication::menuMain"? CODE: Function to create main menu: template <class T, class V> void WtApplication::menuMain(Wt::WStackedWidget*& sw, Wt::WMenu*& mM, T* const tthis, void (V::*)(Wt::WMenuItem* ffunc)) { mM = new WMenu(sw, Wt::Vertical, 0); mM->setRenderAsList(true); mM->setInternalPathEnabled(); mM->itemSelected().connect(tthis, ffunc); mM->setStyleClass("menu"); } Calling function: menuMain(sw, mTools_, this, &WtApplication::upmTools); Compiling error: error: ‘ffunc’ was not declared in this scope Thank you, John -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJRFRnaAAoJEOjf7XlrDgBAhfEH/jAJtQen8OTXcv3i2+/TE575 ELI3G4DTk5iSTCN0ehHGtuJe4MexPpdjz3l4imuEDHgrFlBgSLmCCyvWCH6UF0HW 22OoXE5yloijOm+1TzlQpMINvUuZ5yFVd8r5zgn/ZV3/l/vrVmM/LpcDGKnp9ZQz pIo+kaI9pZWCdJAXNzyYi0IQWcY6no84Y4qHho5DsJBKWKJsePVWN72n0d6Jn/tp zjfYhsc4dOhe/js3u/vLmM/gAf9cgKGiKi0hNoJHZGBbqoQjnUkzxVPVEp4u+lW4 kz1Cml94KhwFk3ZaUSQHlqo2f4E4/WR8FQm+v+vb+w7oUPlqqZZfpKzPMMuc5KE= =LPXH -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest