class Dice
{
public:
Dice();
int Roll();
char get();
enum picture {Fish=1,Shrimp,Crab,Chicken,Golden_Coin,Magic_Barrel};
};
Dice::Dice()
{
int Roll=0;
}
int Dice::Roll()
{
srand(time(NULL));
picture pict=picture(rand()%6+1);
return pict;
}
i have some problem with this code
for example:
Dice x;
a=x.Roll();
b=x.Roll();
both of them will get the same answer
is there anyway to make them have a different number ?