how to use function "random" in vc6.0

Write here if you have problems with your C++ source code

Moderator: Board moderators

Post Reply
hello world
New poster
Posts: 4
Joined: Fri Aug 02, 2002 6:04 pm

how to use function "random" in vc6.0

Post by hello world » Fri Aug 02, 2002 6:49 pm

help,help;

tenshi
New poster
Posts: 14
Joined: Tue Jun 25, 2002 8:50 am

Post by tenshi » Tue Sep 17, 2002 12:32 pm

#include<stdlib.h>
#include<time.h>

int main()
{
srand(time(NULL));
....
....
// rand()%n can get a integer from 0..(n-1)
....
}
http://www.ioiforum.org/en/

A problem discussing forum.
Welcome to discuss problems in it!

Post Reply

Return to “C++”