fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int i=2;
  7. int &ref_i=i;
  8. int &ref_ref_i=ref_i; // should be an error according to c++ 2003 standard
  9.  
  10. cout<<i<<endl<<ref_i<<endl<<ref_ref_i;
  11. return 0;
  12. }
Success #stdin #stdout 0s 2728KB
stdin
Standard input is empty
stdout
2
2
2