my main is:
int main()
{
srand(time(NULL));
...
}
in one of my functions i do this loop:
for (i = 0; i < CODE_LENGTH; i++)
{
code += to_string((rand() % 9) + 1);
}
and for some reason code always turns out to be 6985
CODE_LENGTH is defined to be 4 anyone knows why?
Aucun commentaire:
Enregistrer un commentaire