Isn't it better to have the function return the version, rather than set a global variable? (again, I don't know C++ convention, so maybe there are reasons this is better)