Okay working. (btw - the 100% was a typo, I had it right in the code).
I used :
srand(time(NULL));
Thanks,
Gir.
Type: Posts; User: Gir
Okay working. (btw - the 100% was a typo, I had it right in the code).
I used :
srand(time(NULL));
Thanks,
Gir.
int randvar=rand()%100; //not working
Hi, If i use the line above it generates the same number (7) each time on my system (osx10.3). Doe anyone know why this happens? Something wrong with the code...
That looks good. Thanks! I'm going to have a play with that.
Gir.
Hi,
I'm familiar with shell scripting and have just gotten interested in c++ for programming. I've been following sams c++ which is going well and I'm learning a fair bit.
The problem however...