Just for the record: if you are not going to change the value inside the function, sometimes it is advisable to just pass it by value. There are compiler optimizations that make this work even better than passing by reference and gains readability. At least that is what I hear.