fork download
  1. #include <iostream>
  2. using namespace std;
  3. struct test
  4. {
  5. test(int&_link):link(_link){}
  6. int&link;
  7. };
  8.  
  9. int main() {
  10. int x=1;
  11. test t(x);
  12. cout<<t.link<<endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
1