lundi 28 août 2017

C++ cin.get(ch) as while loop argument and toupper() method

while (!(cin.get(ch)) || ch >= ('A' + x) || ch < 'A') {}

This are the arguments of while loop and I would like to convert char 'ch' to upper letter, by using toupper() method. Is it possible to use toupper() here without implementing any bigger reconstructions to the code?

Aucun commentaire:

Enregistrer un commentaire