You are reseeding the random number generator each time you call shuffle. You should only seed the random number generator once per application (typically in your application initialization): int main() { // other initialization srand(time(NULL)); // seed the number generator // ... } Sh...