3Fermer5
geogeoLe 29/08/2003 à 18:59
1. Un ancien topic parle de ça d'ailleurs. Kevin avait donné une solution avec un compteur.

Je t'offre que ça:
tiré de ISO-C99 

EXAMPLE The following functions define a portable implementation of rand and srand.
static unsigned long int next = 1;
int rand(void) // RAND_MAX assumed to be 32767
{
  next = next * 1103515245 + 12345;
  return (unsigned int)(next/65536) % 32768;
}



2. Pour la gestion du clavier c'est 12 nop.
3. Connaît pas. sad