@ProfessorHankStalica
  @ProfessorHankStalica
Professor Hank Stalica | C+ + Tutorial: how to do input validation using while loops. @ProfessorHankStalica | Uploaded 2 years ago | Updated 2 hours ago
I demonstrate how to perform input validation in C++ using a while loop. This is a tutorial for beginners introducing the topic as covered in our textbook.

In other words, we're going to check user input with a while loop.

2:18 ⇒ Theory
3:39 ⇒ Get to the code

Here's the basic algorithm:

Ask for some input
while the input is something we don't like:
Tell the user there something wrong
Ask for the input again

Continue on with the rest of the program

We'll cover the logic, write a sample program, and see what happens if you use if (bad) instead of while (good), a common mistake made by new students. Sample programs are written using Visual Studio 2022.



// Learn More //
C++ Playlist:
https://youtube.com/playlist?list=PLaatXkJEXKyIK736SvHJBY6cc8azGaxXo

while loops:
https://youtu.be/qWcHvXdeDlA

// Consider supporting this channel in multiple ways
https://paypal.me/hankstalica1
Bitcoin: 177wfkQwzXiC8o2whQMVpSyuWUs95krKYB
C+ + Tutorial:  how to do input validation using while loops.Java Tutorial #5: for loops, while loops, and do while loopsVariables and Data Types   Kotlin Tutorial [Part 2]C++ inline member functions for classes [3]The Queue Data Structure Peek Algorithm (Part 3 of 4)C++ increment and decrement operator overloading [6]Doubly Linked lists Tutorial #5: removing a node from the list (updated)while loops   Kotlin tutorial [Part 8]C-string functions: strlen, strcpy, strcat, strncpy, strncat, strcmp, strstrMath operators [add, subtract, multiply, divide, modulus]   Kotlin Tutorial [Part 4]C++ What is class inheritance?  [1]C++ STL Tutorial: sets

C+ + Tutorial: how to do input validation using while loops. @ProfessorHankStalica

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER