Message from C, C++ discussions

November 2019

— Then it scanf for a variable called ArrayMemberTotal , if you put in an int like 2 , 4 , or something like that it works fine

Message permanent page


But lets say there is an error on the user end, i want it to print a timed error message(i have a function that does that ) then re ask the qestions until and scan again

— I tryed goto and it doesnt do what i am trying to do

— Goto statement is only useful and must only be used for cleanup and not for retry

— So in this case what would be a good way to deal with this issue

— The program otherwise works , but if there is an error on the user end , like entering an Letter instead of an number, it doesnt work

Message permanent page

— Maybe 12 hours drive for me lol

— Alright I got your program flow. What I need to understand now is that what error are you talking about? Are you talking about the error when a user enters some arbitrary character other than INTEGER or aSTRING?

Message permanent page

— Why?

— If user puts some arbitrary character

— Alright

— While loop
Dude, you are writing the same code for like a week