Where to put break; due to user invalid
Where to put break; due to user invalid input
Nov 7, 2021 at 2:48am UTC
Hello I'm new to c++, I'm creating a reservation system for my school project this is kinda a dumb question where should I put break; due to user invalid input. Can't post the whole system because it's too long here is the link below. Thanks
Last edited on
Nov 7, 2021 at 2:51am UTC
Nov 7, 2021 at 3:01am UTC
Your link is borked. Remove the angle brackets.
Do not EVER call main() in your code. You can call other functions, but never main().
Nov 7, 2021 at 4:04am UTC
typically you don't break.
input validation is usually
get value as string
while (not valid)
the only time you would break or do something odd is like a password, where you might have 3 tries then lock them out or whatever. Do you need that idea?
Topic archived. No new replies allowed.
General C++ Programming
© cplusplus.com, 2000-2021 - All rights reserved -
Spotted an error? contact us