Input Validation C++ (integer) - while() - cin.ignore() - cin.clear()

preview_player
Показать описание

__GITHUB REPO__:

__ABOUT THIS CHANNEL__:
It is my goal to help you succeed in your journey in learning to code. That’s why I’m here—to serve you. I enjoy teaching and spreading knowledge of the things that I am passionate about. I am a husband and a father, far from perfect, and striving to be better every day. Thank you for taking interest in what I do!

__FIND ME__:

__SUPPORT THIS CHANNEL__:
||
RECOMMENDED BOOKS:

EQUIPMENT USED:

RECENTLY READ BOOKS:
||
__
Рекомендации по теме
Комментарии
Автор

Jesus, really a great video, I was searching for this action when the user puts a char or string instead of int and how to clear and "reset" cin. It was a big help!

claudiomarques
Автор

Thanks, man.
U've really help me.
I came across these functions in c++(and I use them also) but I really don't understand the principle on which they operate. Your video has been so helpful to me.

Thanks.

Waiting for more

jonasonipanua
Автор

Thanks man, you a lifesaver. It took a while for me to incorporate this to my code but I got there in the end. Cheers.

AshickonYT
Автор

Bruh thanks for making this I was wondering why I had to input the number twice before It would accept anything
Then realized I was asking for the input twice

Abandex
Автор

Thank you very much random guy that have uploaded this beautiful tutorial

okaberintaro
Автор

How would you use this to validate a character string length?
For example, the user needs to input a 6 letter word. If he inputs only 5, display an error message.

hms
Автор

Thank you for the super video. It was very simple and I was struggling with this for a while. Question - how could test whether it is a number and whether it is a specific number like 2 or 4?

TJKhara
Автор

This is what I found, Thank you so much😭😭

harliepole
Автор

Can you make the whole loop check for the following 3 conditions ?
Must be a number
Must be a positive number
Must be a whole number

alexcastel
Автор

You save my fucking Life!!! thanks from Puerto

renevelez
Автор

what does cin.good() do and cin.fail() do and how do we use them?

karmellammy
Автор

thanks bro!!! helped me with my homework ahaha

keeper-
Автор

hey i jus wanna explain the error and clear the cin and exit out what to do ??

RaviShankar-optd
Автор

How would I check if a string is a string and throw an error if it’s not?

nabeelkara
Автор

Great but what if I wanna put zero as input?

PioloLoni
Автор

what if my input is 1a
which contain interfere and char

teongjihperng
welcome to shbcf.ru