|
From: ropbert d b. <lon...@ju...> - 2001-02-07 20:13:17
|
Here is a piece of a program which will help.
using std::srand;
using std::rand;
// part of main
srand(time(0));
int roll1(int dice_1)
{
dice_1=rand()/(RAND_MAX/7);
return dice_1;
}
On Wed, 07 Feb 2001 17:57:40 -0000 "Ian Weston"
<lak...@ho...> writes:
>
> hi everyone, just a quicky, does anyone know how to make a random
> number?
> i've tried:
>
> messpool = rand() %12;
>
> but that comes up with the same number everytime so i must be way
> off. if
> anyone could help i would be greatful.
>
> thanks
>
_________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com.
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|