0
How to prevent user from entering number in c++?
2 Respostas
+ 13
This code prevents Integer input and asks for the correct one which just contains characters.
[http://cpp.sh/9j4d]
https://code.sololearn.com/ceHKDfo2cgVE/?ref=app
+ 3
You can't prevent users from doing anything. You can detect that they have enter something and ignore/complain as needed. Read the input as strings, verify the characters are as expected, and complain or process as desired.