[Solved] Variable life-time in member-function, values keep reseting to `0`, why? [closed]
You are declaring the variables as local to the function. That is why they are being reset every time you call the function. To preserve the values between function calls, you have to move the variables into members of the class instead. Your Die class is also not well designed, either. You should be seeding … Read more