Hi this is my first post and after using this website it's helped me out quite a bit and everyone seems very helpful. I was working on some homework and I'm still pretty new to it all. The problem I'm having is that the number it generates is the same number for all the 'stats'. I need each stat to be random but it seems as though they all share the same number based off the first. Can anyone help me?
You should only seed the random number generator once. Just move srand(static_cast<unsignedint>(time(0)));
outside the loop. Putting it at the start of main is usually best.