Is it possible to have c++ make a random letter? or is there a way possibly to modify,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
switch (c)
{
case'1' : maxrand = 15; // the random number will be between 0 and maxrand
break;
case'2' : maxrand = 30;
break;
case'3' : maxrand = 50;
break;
default : exit(0);
break;
}
life = 5; // number of lifes of the player
srand( (unsigned)time( NULL ) ); // init Rand() function
j = rand() % maxrand; // j get a random value between 0 and maxrand
GetResults();