I'm trying to write some code in c++ for a game, and I need to use a random number generator. I want the computer to pick a number between 1 and 713, but it always picks 41.
int x;
x = wordbank.size();
int m;
m = rand() % x;
Here is my code. wordbank is a vector, and x is the size of wordbank(713). Can anyone help me?
Thank you