dimanche 17 décembre 2017

c++ for loop does not terminate

It might be quite a simple question, but my following code does not terminate, when I type in "s" for stop.

for ( roundNr = 1;roundNr <=3; roundNr++) {
    optiongame(roundNr);
    std::cout<<"Do you want to continue with the game? Press s for stop or press p for play \n";
    std::cin>> playstop;
    if (playstop == s) {
        break;
    }

}

Could anyone help me with that? I would appreciate that

Aucun commentaire:

Enregistrer un commentaire