fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int modifyRef(int& A)
  6. {
  7. A = 0;
  8. std::cout << "\nint& A = 0";
  9. return A;
  10. }
  11.  
  12. void TakeValues(int X, int Y)
  13. {
  14. std::cout << "\nX = " << X;
  15. std::cout << "\nY = " << Y;
  16. }
  17.  
  18. int main()
  19. {
  20. int Q = 9;
  21. TakeValues(Q, modifyRef(Q));
  22. std::cout << std::endl;
  23. system("pause");
  24. return 0;
  25. }
Success #stdin #stdout #stderr 0s 3456KB
stdin
Standard input is empty
stdout
int& A = 0
X = 0
Y = 0
stderr
sh: 1: pause: not found