fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4. std::string str = "test";
  5. std::string& ref = (std::string&) str;
  6.  
  7. std::cout << ref << std::endl;
  8.  
  9. return 0;
  10. }
Success #stdin #stdout 0s 4392KB
stdin
Standard input is empty
stdout
test