seed your random number generator:
Code:srand(time(NULL)); // do this once per run of the program
then you can do this:Originally posted by Lithorien
Code:rand()%10 + 1
vvv And here are some books vvv
seed your random number generator:
Code:srand(time(NULL)); // do this once per run of the program
then you can do this:Originally posted by Lithorien
Code:rand()%10 + 1
vvv And here are some books vvv
- "Problem Solving C++, The Object of Programming" -Walter Savitch
- "Data Structures and Other Objects using C++" -Walter Savitch
- "Assembly Language for Intel-Based Computers" -Kip Irvine
- "Programming Windows, 5th edition" -Charles Petzold
- "Visual C++ MFC Programming by Example" -John E. Swanke
- "Network Programming Windows" -Jones/Ohlund
- "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
- "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel