fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void af(int &g)
  5. {
  6. g++;
  7. cout<<g<<endl;
  8. }
  9.  
  10. int main()
  11. {
  12. int g = 123;
  13. cout << g << endl;
  14. af(g);
  15. cout << g << endl;
  16. return 0;
  17. }
Success #stdin #stdout 0s 4396KB
stdin
Standard input is empty
stdout
123
124
124