fork(3) download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. struct Input_Interface {
  6. struct command_output {
  7. std::string command;
  8. void (*output_function)();
  9. };
  10.  
  11. static void Clear();
  12. static void Quit_loop();
  13. };
  14.  
  15. void Input_Interface::Clear()
  16. {
  17. cout << "Clear called" << endl;
  18. }
  19.  
  20. int main() {
  21. Input_Interface::command_output t = {"CLEAR", Input_Interface::Clear};
  22. t.output_function();
  23. return 0;
  24. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
Clear called