fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int I = 5;
  5.  
  6. int& clone(int& i)
  7. {
  8. int * p = &i;
  9. return *p;
  10. }
  11.  
  12. int main() {
  13.  
  14. cout << I << endl;
  15.  
  16. clone(I) += 5;
  17.  
  18. cout << I << endl;
  19.  
  20. }
Success #stdin #stdout 0s 4344KB
stdin
Standard input is empty
stdout
5
10