Thread: random numbers
View Single Post
Old 07-19-2004, 10:48 AM   #1 (permalink)
Rotkiv
Code Monkey
 
Rotkiv's Avatar
 
Join Date: Apr 2004
Location: Silicon Valley, CA
Posts: 59
Rotkiv is on a distinguished road
Send a message via AIM to Rotkiv Send a message via MSN to Rotkiv
random numbers

how to get a totally random number every time the program is run.

here is some code

Code:
cout << array[0 + rand() % 12] << " | ";
the array has 12 strings in it, and i need it to print a random one.
Rotkiv is offline   Reply With Quote