fork download
  1. #include <string>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. string MyString()
  7. {
  8. return "Hello!";
  9. }
  10.  
  11. string UseString(const string &s)
  12. {
  13. return s + " Bye!!!";
  14. }
  15.  
  16. int main()
  17. {
  18. cout << MyString() << endl;
  19. cout << UseString(MyString()) << endl;
  20. return 0;
  21. }
Success #stdin #stdout 0s 2856KB
stdin
Standard input is empty
stdout
Hello!
Hello! Bye!!!