dimanche 21 novembre 2021

How to choose a random character from an array in C++?

I'm making a rock-paper-scissors game, in which the computer picks a character 'r', 'p' or 's' randomly in each round. How can I do that?

char random_array[3] = {'r', 'p', 's'};




Aucun commentaire:

Enregistrer un commentaire