fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int a;
  5.  
  6. void addMe(int &a) {
  7. a=a+1;
  8. }
  9.  
  10. int main () {
  11. int b = 10;
  12. addMe(b);
  13. cout << "Answer:" << b << endl;
  14. return 0;
  15. }
Success #stdin #stdout 0s 4536KB
stdin
Standard input is empty
stdout
Answer:11