I wish to send an 'int' to a function that changes its value. I want to send it by reference so the new value of 'int' is kept after returning to the callee. What is the most effective way to do it?
I know that I can use a wrapper class Integer that sends an object of an 'int'. However, I can't figure out how to change the value of this class, so the change will prevail after returning to the callee.
Thanks for your help.