28Fermer30
KochiseLe 29/01/2011 à 20:02
Boaf, le plus simple est encore :

int nMaxString = N;
char **pStringArray = {"String1", "String2", "String3", ..., "StringN"};
char* pMyString = pStringArray[rand()%nMaxString];


C'est rapide, efficace, et t'évites les collisions. Par contre pour la prédictibilité...

Kochise