fork download
  1. #include <iostream>
  2. #include <map>
  3. #include <string>
  4. using namespace std;
  5.  
  6. struct Yoba {
  7. static void a() { std::cout << "!";}
  8. };
  9.  
  10. std::map<std::string, decltype(&Yoba::a)> themap;
  11.  
  12. int main() {
  13. themap["a"] = &Yoba::a;
  14. themap["a"]();
  15. // your code goes here
  16. return 0;
  17. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
!