Code: Select all
int i;
i = rand() % 4;
In q3_ui (more specifically in ui_main.c) I'm trying to use the same code to generate a random number, but for some reason, it always generates the same number for me. If I leave out the "% 4" bit, then it always generates the number 41 for me. Why is this not working? Do I need to manually initialize some seed or something somewhere? And if so, how?