+ 1
we define int a and waiting user to input and we assing it to a but what if user's input is not a integer ?
C++ Input
3 Respuestas
+ 6
Then the program crashes as an int cannot be assigned as a string.
Use a try catch to handle this.
+ 2
Yes. As Rrestoring said, always check the inputs with try
+ 2
Ty so much guys