fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct C
  5. {
  6. virtual void send_command( const std::string& command, const std::string& key, const std::string& value, bool pipeline = true )
  7. {
  8. cout << "string, string, string, bool\n";
  9. }
  10. virtual void send_command( const std::string& command, const std::string& key, bool pipeline = true )
  11. {
  12. cout << "string, string, bool\n";
  13. }
  14. virtual void send_command( const std::string& command, bool pipeline = true )
  15. {
  16. cout << "string, bool\n";
  17. }
  18. void send_command(const std::string& command, const char* key)
  19. { send_command(command, std::string(key)); }
  20. };
  21.  
  22. int main() {
  23. C c;
  24. c.send_command("MUTLI");
  25. c.send_command("SET", "foo", "bar");
  26. c.send_command("GET", "foo");
  27. c.send_command("EXEC");
  28. return 0;
  29. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
string, bool
string, string, bool
string, string, bool
string, bool