fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void func(int& max)
  5. {
  6. max = 12;
  7. cout << max << endl;
  8. }
  9. int main() {
  10. const int MAX = 23;
  11.  
  12. func((int &)MAX);
  13. return 0;
  14. }
Success #stdin #stdout 0s 5656KB
stdin
Standard input is empty
stdout
12